Closed wevertonrs closed 2 months ago
This was fixed in https://go.dev/cl/507975. To get this fix we recommend upgrading to go1.21 or later
Okey thanks!
The error message says
panic: invalid Go version "go1.22.1" (should be something like "go1.12")
but this IS the current version, according to https://go.dev/doc/install , isn't it? I've upgraded my Go today, and hitting this error every time I launch Neovim.
Can you try reinstalling gopls with the newer go version? It appears to be built with go1.20.4.
Running go install golang.org/x/tools/gopls@latest
where go is go1.22.1 should reinstall with the newer toolchain.
After running you can verify that the go version is go1.22.1 by running the following:
$ gopls -v version
Please let me know if that works!
@suzmue : Indeed, after installing gopls
explicitly, the issue is gone.
A few things that were confusing to me:
gopls
comes with itgopls
version, so I've assumed that's all you want.Thank you, and sorry for confusion.
gopls version: v0.15.2/go1.20.4 gopls flags: update flags: proxy extension version: 0.41.2 environment: Visual Studio Code win32 initialization error: undefined issue timestamp: Fri, 22 Mar 2024 22:38:21 GMT restart history: Fri, 22 Mar 2024 22:37:29 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
gopls stats -anon
{ "DirStats": { "Files": 34, "TestdataFiles": 0, "GoFiles": 5, "ModFiles": 1, "Dirs": 20 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.20.4", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "4.0224353s", "MemStats": { "HeapAlloc": 8825880, "HeapInUse": 16572416, "TotalAlloc": 98190112 }, "WorkspaceStats": { "Files": { "Total": 493, "Largest": 210104, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 67, "LargestPackage": 148, "CompiledGoFiles": 491, "Modules": 1 }, "WorkspacePackages": { "Packages": 5, "LargestPackage": 2, "CompiledGoFiles": 6, "Modules": 1 }, "Diagnostics": 0 } ] } }