-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
x/tools/gopls: panic: invalid Go version "go1.22.1" (should be something like "go1.12") #66553
Comments
@tvendelin Thanks for the bug! I see that you are using go1.22.1 which I think should not have this issue. Can you check what version of go gopls is built with by running I am trying to investigate why this issue is coming up so frequently in the last week, what changed that made you encounter this issue now? Did you recently update go versions? |
@suzmue "Waiting for info"? Your question is already answered in my bug report. I've also described a workaround. From what I see, a |
we asked for the output of a specific command, which you have not provided. |
Assuming that the gopls you are running was built with an older go version, you will need to rebuild gopls with go1.21 or newer:
You can verify that gopls has the new version by:
|
I'm also seeing this issue. Trying to set up nvim LSP with gopls.
|
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
This may have been a duplicate of #66636 . |
gopls version
golang.org/x/tools/gopls v0.15.2
go env
What did you do?
What did you see happen?
What did you expect to see?
vim-go: finished loading packages
If I edit
go.mod
and remove the patch number from the version (1.22.1
to1.22
in my case), then it works without errors. This relates, I think, to the closed issue golang/vscode-go#3276Editor and settings
Neovim
$ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
Config: https://github.com/tvendelin/nvim
Logs
The text was updated successfully, but these errors were encountered: