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) #3298

Closed yernsun closed 3 months ago

yernsun commented 3 months ago

gopls version: v0.15.2/go1.19.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 08:44:33 GMT restart history: Mon, 01 Apr 2024 08:44:18 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

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

goroutine 4433 [running]:
go/types.NewChecker(0x0%3F, 0xc0021ac140, 0xc004a9b630, 0x0%3F)
      check.go:240  0x24e
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck(0xc000722000, {0xc0038b7de0, 0x2, 0x2})
      analysis.go:1028  0x72c
golang.org/x/tools/gopls/internal/cache.(*analysisNode).run(0xc000722000, {0x1c84ca0, 0xc001a80480})
      analysis.go:810  0xd9
golang.org/x/tools/gopls/internal/cache.(*analysisNode).runCached(0xc000722000, {0x1c84ca0%3F, 0xc001a80480})
      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
gopls stats -anon { "DirStats": { "Files": 83, "TestdataFiles": 0, "GoFiles": 39, "ModFiles": 1, "Dirs": 35 }, "GOARCH": "amd64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.19.3", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "793.453625ms", "MemStats": { "HeapAlloc": 26476584, "HeapInUse": 37011456, "TotalAlloc": 56222664 }, "WorkspaceStats": { "Files": { "Total": 1908, "Largest": 395043, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.21.8", "AllPackages": { "Packages": 345, "LargestPackage": 140, "CompiledGoFiles": 1918, "Modules": 46 }, "WorkspacePackages": { "Packages": 15, "LargestPackage": 12, "CompiledGoFiles": 53, "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.
findleyr commented 3 months ago

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