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

unrecognized parameter: '--pkg-begin' #1099

Closed
chrboesch opened this issue Mar 29, 2023 · 6 comments
Closed

unrecognized parameter: '--pkg-begin' #1099

chrboesch opened this issue Mar 29, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@chrboesch
Copy link

Zig Version

0.11.0-dev.2312+dd66e0add

Zig Language Server Version

0.11.0-dev.357+9a7d262

Steps to Reproduce

After a view minutes working with Neovim zls crashes.

Expected Behavior

No crash.

Actual Behavior

After the crash, LSP-log shows the error:

[ERROR][2023-03-29 13:35:23] .../vim/lsp/rpc.lua:733	"rpc"	"zls"	"stderr"	"error: (store ): Failed to execute build runner to collect build configuration, command:\n/home/chris/.local/lib/zig/zig run /home/chris/.cache/zls/build_runner.zig --cache-dir /home/chris/.cache/zls --pkg-begin @build@ /home/chris/workspace/zig/test/build/3/build.zig --pkg-end -- /home/chris/.local/lib/zig/zig /home/chris/workspace/zig/test/build/3 zig-cache ZLS_DONT_CARE\nError: error: unrecognized parameter: '--pkg-begin'\n\nerror: (store ): Failed to load build configuration for file:///home/chris/workspace/zig/test/build/3/build.zig (error: error.RunFailed)\n"
@chrboesch chrboesch added the bug Something isn't working label Mar 29, 2023
@leecannon
Copy link
Member

Your zls is too old to function with a recent version of zig master as the build runner and modules have changed in a backwards incompatible way.

@chrboesch
Copy link
Author

Hm, I tried git pull on master to compile the latest version and get Already up to date.

@leecannon
Copy link
Member

leecannon commented Mar 29, 2023

The command to execute the build runner that zls master uses is zig build --build-runner build_runner.zig (from populateBuildConfigurationArgs in DocumentStore.zig) this change was made in #1029.

Your zls is using the old build runner execution arguments with --pkg-begin @build@ /home/chris/workspace/zig/test/build/3/build.zig --pkg-end that zig master no long supports, the only mention of --pkg-begin in the codebase was removed as part of #1029.

@chrboesch
Copy link
Author

Ok, I will see if Mason changed my zls which I built yesterday. I put it always in the path /home/chris/.local/share/nvim/mason/packages/zls/bin/ and that should work.

@chrboesch
Copy link
Author

Indeed Mason changed my zls with its own build. Sorry for that issue. 😞

@chrboesch
Copy link
Author

I have now deleted mason-receipt.json so it cannot happen again!

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