williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.61k stars 271 forks source link

ZLS new compression - zst instead of gz #618

Closed candrewlee14 closed 1 year ago

candrewlee14 commented 1 year ago

I've searched open issues for similar requests

Yes

I've manually reviewed logs to find potential errors

Yes

I've recently downloaded the latest plugin version of mason.nvim

Problem description

The latest version of zls, the language server for Zig, cannot be installed. zls changed the release compression format from *.tar.gz to *.tar.zst. Right now, when trying to install zls, I get a 404 URL error and installation fails.

Expected behavior

Run :LspInstall zls and the download succeeds and decompresses from the right link.

Steps to reproduce

  1. :LspInstall zls

Affected packages

zls

Neovim version (>= 0.7)

NVIM v0.8.0-1210-gd367ed9b2 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

WSL2 Linux

Healthcheck

N/A

Screenshots or recordings

No response

g15ecb commented 1 year ago

Bumped into this just now as well. Quick scan of Mason source code: looks like support for *.tar.zst needs to be added, e.g. in GitHub manager -- untarzst_release_file. Then in zls registry:

install = function(ctx)
        local asset_file = coalesce(
            when(platform.is.mac, "x86_64-macos.tar.zst"),
            when(platform.is.linux_x64, "x86_64-linux.tar.zst"),
            when(platform.is.linux_x86, "i386-linux.tar.zst"),
            when(platform.is.win_x64, "x86_64-windows.tar.zst")
        )
        github
            .untarzst_release_file({
                repo = "zigtools/zls",
                asset_file = asset_file,
            })
            .with_receipt()

All the releases of zls prior to 0.10.0 are still .tar.gz so I suppose it's easier to just support everything but >= 0.10.0? I'm assuming that zls team from now on are going to just release pre-build binaries using zstd.

williamboman commented 1 year ago

All the releases of zls prior to 0.10.0 are still .tar.gz so I suppose it's easier to just support everything but >= 0.10.0? I'm assuming that zls team from now on are going to just release pre-build binaries using zstd.

Yeah installing versions prior to 0.10.0 won't really work anymore as the installation script doesn't account for historic distribution methods

candrewlee14 commented 1 year ago

For an unstable language like Zig, installing a previous version of zls wouldn’t make much sense right now so that seems reasonable.