-
Notifications
You must be signed in to change notification settings - Fork 768
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
gopls: panic with invalid Go version #3276
Comments
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
but this IS the current version, according to https://go.dev/doc/install , isn't it? |
Can you try reinstalling gopls with the newer go version? It appears to be built with go1.20.4. After running you can verify that the go version is go1.22.1 by running the following:
Please let me know if that works! |
@suzmue : Indeed, after installing
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 } ] } }OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
The text was updated successfully, but these errors were encountered: