go
go copied to clipboard
x/tools/gopls: "go/packages returned unexpected package %q for standalone file" bug in Snapshot.load
#!stacks
"bug.Errorf" && "cache.(*Snapshot).load:+140"
Issue created by stacks.
Related to https://github.com/golang/go/issues/64233?
This stack Uu4tWg was reported by telemetry:
gopls/buggolang.org/x/tools/gopls/internal/util/bug.report:+35golang.org/x/tools/gopls/internal/util/bug.Errorf:+2golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36golang.org/x/tools/gopls/internal/cache.(*Snapshot).orphanedFileDiagnostics:+13golang.org/x/tools/gopls/internal/cache.(*Session).OrphanedFileDiagnostics:+55golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews:+54golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2:+1runtime.goexit:+0
golang.org/x/tools/[email protected] go1.23.2 linux/amd64 coc.nvim (1)
Related Issues and Documentation
- x/tools/gopls: "go/packages failed to return non-test standalone package" bug (reported by telemetry) #66204
- x/tools/gopls: "nil metadata for %q" panic in Snapshot.getPackageHandles (reported by telemetry) #66144
- x/tools/gopls: bug: load.go:185: go/packages returned unexpected package "golang.org/x/tools/go/callgraph/cha/testdata/iface.go.~master~" for standalone file #69331
- x/tools/gopls: "package name is %q, want %q" bug in typeCheckBatch.importPackage #64235
- x/tools/gopls: bug reported by telemetry [qoVPwQ] #64243 (closed)
- x/tools/gopls: "unexpected files in command-line-arguments package" bug (via telemetry) #64557
- x/tools/gopls: NarrowestMetadataForFile bug reported by telemetry #64233 (closed)
- x/tools/gopls: "unexpected file: %q" bug.Report in bestView (reported by telemetry) #67288
- x/tools/gopls: strange output with gopls >= 0.3.0, no actual errors detected #37046 (closed)
- x/tools/gopls: bug in analysis importer reported by telemetry #64236
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Change https://go.dev/cl/621859 mentions this issue: gopls/internal/cache: avoid reporting bugs when go/packages has errors
This stack hbJFWg was reported by telemetry:
gopls/buggolang.org/x/tools/gopls/internal/util/bug.report:+35golang.org/x/tools/gopls/internal/util/bug.Errorf:+2golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+136golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36golang.org/x/tools/gopls/internal/cache.(*Snapshot).orphanedFileDiagnostics:+13golang.org/x/tools/gopls/internal/cache.(*Session).OrphanedFileDiagnostics:+50golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews:+54golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2:+1runtime.goexit:+0
golang.org/x/tools/[email protected] go1.22.2 linux/amd64 coc.nvim,other (1)
This stack KaBt7Q was reported by telemetry:
gopls/buggolang.org/x/tools/gopls/internal/util/bug.report:+35golang.org/x/tools/gopls/internal/util/bug.Errorf:+2golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36golang.org/x/tools/gopls/internal/golang.NarrowestMetadataForFile:+1golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedFiles:+33golang.org/x/tools/gopls/internal/server.(*server).diagnoseSnapshot:+25golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews.func1:+3runtime.goexit:+0
golang.org/x/tools/[email protected] go1.23.2 darwin/arm64 neovim (2)