golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.78k stars 728 forks source link

gopls: automated issue report (crash) #3299

Closed romanzkv closed 3 months ago

romanzkv commented 3 months ago

gopls version: v0.15.2/go1.20.3 gopls flags: update flags: proxy extension version: 0.41.2 environment: Visual Studio Code darwin initialization error: undefined issue timestamp: Mon, 01 Apr 2024 13:40:41 GMT restart history: Mon, 01 Apr 2024 13:40:33 GMT: activation (enabled: true) Mon, 01 Apr 2024 13:40:45 GMT: installation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: invalid Go version "go1.22.1" (should be something like "go1.12")

goroutine 3195 [running]:
go/types.NewChecker(0x140036a3a88%3F, 0x14001f2a5c0, 0x14003320fa0, 0x0%3F)
      check.go:237  0x1e8
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck(0x14000e7f290, {0x14000501aa0, 0x6, 0x6})
      analysis.go:1028  0x5fc
golang.org/x/tools/gopls/internal/cache.(*analysisNode).run(0x14000e7f290, {0x1053ae898%3F, 0x1400276d0b0})
      analysis.go:810  0x1d4
golang.org/x/tools/gopls/internal/cache.(*analysisNode).runCached(0x14000e7f290, {0x1053ae898%3F, 0x1400276d0b0})
      analysis.go:672  0x104
golang.org/x/tools/gopls/internal/cache.(*Snapshot).Analyze.func6.1()
      analysis.go:398  0xa4
golang.org/x/sync/errgroup.(*Group).Go.func1()
      errgroup.go:78  0x5c
created by golang.org/x/sync/errgroup.(*Group).Go
      errgroup.go:75  0xa0
gopls stats -anon { "DirStats": { "Files": 1386, "TestdataFiles": 0, "GoFiles": 38, "ModFiles": 2, "Dirs": 291 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.1", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "523.45875ms", "MemStats": { "HeapAlloc": 30351336, "HeapInUse": 46678016, "TotalAlloc": 375365704 }, "WorkspaceStats": { "Files": { "Total": 1442, "Largest": 395026, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 244, "LargestPackage": 155, "CompiledGoFiles": 1452, "Modules": 19 }, "WorkspacePackages": { "Packages": 16, "LargestPackage": 8, "CompiledGoFiles": 52, "Modules": 1 }, "Diagnostics": 1 } ] } }
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.
findleyr commented 3 months ago

Duplicate of golang/go#66636, which we will fix for gopls@v0.15.3.