Closed LordWelldown closed 3 months ago
gopls version: v0.15.2/go1.20.6 gopls flags: update flags: proxy extension version: 0.41.2 environment: Visual Studio Code linux initialization error: undefined issue timestamp: Tue, 02 Apr 2024 09:16:22 GMT restart history: Tue, 02 Apr 2024 09:15:53 GMT: activation (enabled: true) Tue, 02 Apr 2024 09:16:32 GMT: installation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
panic: invalid Go version "go1.21.2" (should be something like "go1.12") goroutine 1972 [running]: go/types.NewChecker(0x0%3F, 0xc0008f4dc0, 0xc001883d10, 0x0%3F) check.go:237 0x24e golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck(0xc0011e0160, {0xc0019fe248, 0x1, 0x1}) analysis.go:1028 0x73d golang.org/x/tools/gopls/internal/cache.(*analysisNode).run(0xc0011e0160, {0x124f4e0%3F, 0xc0012fcf90}) analysis.go:810 0x218 golang.org/x/tools/gopls/internal/cache.(*analysisNode).runCached(0xc0011e0160, {0x124f4e0%3F, 0xc0012fcf90}) analysis.go:672 0x145 golang.org/x/tools/gopls/internal/cache.(*Snapshot).Analyze.func6.1() analysis.go:398 0xda golang.org/x/sync/errgroup.(*Group).Go.func1() errgroup.go:78 0x64 created by golang.org/x/sync/errgroup.(*Group).Go errgroup.go:75 0xa5
Thanks for the report. This is a dupe of https://go.dev/issue/66636 (fix is pending).
In the meantime, you can also fix this by reinstalling gopls with go 1.21 or later.
gopls version: v0.15.2/go1.20.6 gopls flags: update flags: proxy extension version: 0.41.2 environment: Visual Studio Code linux initialization error: undefined issue timestamp: Tue, 02 Apr 2024 09:16:22 GMT restart history: Tue, 02 Apr 2024 09:15:53 GMT: activation (enabled: true) Tue, 02 Apr 2024 09:16:32 GMT: installation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
gopls stats -anon
{ "DirStats": { "Files": 44, "TestdataFiles": 0, "GoFiles": 2, "ModFiles": 1, "Dirs": 24 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.1", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "932.758342ms", "MemStats": { "HeapAlloc": 14719456, "HeapInUse": 22405120, "TotalAlloc": 186926000 }, "WorkspaceStats": { "Files": { "Total": 904, "Largest": 395026, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 138, "LargestPackage": 161, "CompiledGoFiles": 900, "Modules": 3 }, "WorkspacePackages": { "Packages": 2, "LargestPackage": 1, "CompiledGoFiles": 2, "Modules": 1 }, "Diagnostics": 0 } ] } }