Skip to content
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: automated issue report (crash) #3283

Closed
mosixsigma opened this issue Mar 26, 2024 · 2 comments
Closed

gopls: automated issue report (crash) #3283

mosixsigma opened this issue Mar 26, 2024 · 2 comments
Milestone

Comments

@mosixsigma
Copy link

gopls version: v0.15.2/go1.20.5
gopls flags:
update flags: proxy
extension version: 0.41.2
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Tue, 26 Mar 2024 07:15:43 GMT
restart history:
Sat, 23 Mar 2024 10:39:27 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

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

goroutine 6478 [running]:
go/types.NewChecker(0x14000aa79b0%3F, 0x14003fc5f80, 0x140083661e0, 0x0%3F)
	  check.go:237  0x1e8
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck(0x14002ed9c30, {0x140080fff80, 0x1, 0x1})
	  analysis.go:1028  0x5fc
golang.org/x/tools/gopls/internal/cache.(*analysisNode).run(0x14002ed9c30, {0x104ffe998%3F, 0x140077a8e70})
	  analysis.go:810  0x1d4
golang.org/x/tools/gopls/internal/cache.(*analysisNode).runCached(0x14002ed9c30, {0x104ffe998%3F, 0x140077a8e70})
	  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": 300, "TestdataFiles": 0, "GoFiles": 93, "ModFiles": 1, "Dirs": 154 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.20.5", "GoplsVersion": "v0.15.2", "InitialWorkspaceLoadDuration": "957.247333ms", "MemStats": { "HeapAlloc": 49862744, "HeapInUse": 79994880, "TotalAlloc": 695434208 }, "WorkspaceStats": { "Files": { "Total": 2947, "Largest": 1005602, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 647, "LargestPackage": 155, "CompiledGoFiles": 2957, "Modules": 86 }, "WorkspacePackages": { "Packages": 33, "LargestPackage": 12, "CompiledGoFiles": 107, "Modules": 1 }, "Diagnostics": 3 } ] } }

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>

@gopherbot gopherbot added this to the Untriaged milestone Mar 26, 2024
@suzmue
Copy link
Contributor

suzmue commented Mar 28, 2024

This was fixed in https://go.dev/cl/507975. To get this fix please rebuild gopls with go1.21 or newer:

$ go install golang.org/x/tools/gopls@latest

You can verify that gopls has the new version:

$ gopls -v version
Build info
----------
golang.org/x/tools/gopls v0.15.2
    golang.org/x/tools/gopls@v0.15.2 h1:4JKt4inO8JaFW3l/Fh9X1k/5JQn+iUOpdc4/Lpi0mOs=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/mod@v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
    golang.org/x/sync@v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
    golang.org/x/telemetry@v0.0.0-20240209200032-7b892fcb8a78 h1:vcVnuftN4J4UKLRcgetjzfU9FjjgXUUYUc3JhFplgV4=
    golang.org/x/text@v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
    golang.org/x/tools@v0.18.1-0.20240311201521-78fbdeb61842 h1:No0LMXYFkp3j4oEsPdtY8LUQz33gu79Rm9DE+izMeGQ=
    golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
    honnef.co/go/tools@v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8=
    mvdan.cc/gofumpt@v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
    mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.21.5

Once the new version is installed, be sure to restart the language server using > Go: Restart Language Server

@findleyr
Copy link
Member

findleyr commented Apr 1, 2024

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

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants