Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incorrect zls version installed for master. Nightly release does not track master branch. #94

Open
Fittiboy opened this issue Aug 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Fittiboy
Copy link

Describe the bug
Running zvm i --zls master installs the latest stable version of zls, instead of the one matching the master branch.

To Reproduce

  1. Run zvm i --zls master
  2. Check zig version
  3. Check zls --version
  4. Discover version mismatch:
➜   zig version
0.14.0-dev.1117+11176d22f
➜   zls --version
0.13.0

Expected behavior
The latest version of zls, matching the current master branch, should be installed when running zvm i --zls master.

Desktop (please complete the following information):

  • OS: Linux
  • Architecture: x86-64
  • Version: ZVM version v0.7.4 linux/amd64

Configuration:

  • VMU (Version Map URL) or alias: default

Additional context
As zls 0.13.0 is still partially compatible with Zig's master branch, the version mismatch is not immediately obvious to the user, but silently breaks some functionality. This unfortunately happened to me as I was migrating some stuff from vim to nvim, leading to a frustrating debugging process when some LSP features seemed to just not work.

Possible solution
Build zls from source for master. Either by default if the version is master, or warn the user that zls for master can only be installed by providing some additional --zls-from-source flag.

@tristanisham tristanisham self-assigned this Aug 31, 2024
@tristanisham tristanisham added the bug Something isn't working label Aug 31, 2024
@tristanisham
Copy link
Owner

It looks like this issue primarily stems from the ZLS team not having released a compatible binary. Since they're a little behind, a potential solution would be adding a --from-src flag (I'm not set on that name) that, like you said, would compile ZLS from GitHub using the specified version of Zig.

Maybe it'd only be available when you were installing master?

Or maybe we just print an info notice?

@Fittiboy
Copy link
Author

Fittiboy commented Sep 1, 2024

Print a notice if there's a version mismatch, telling the user they can get zls --from-src to fix it. That seems like a clean solution. If there's no version mismatch, nothing changes. If there is a version mismatch, the user automatically learns how to fix it if they care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants