-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/telemetry-wins
Milestone
Description
#!stacks
"bug.Reportf" && "getOneTransitiveRefLocked:+32"
Issue created by stacks.
// Note that if (!ok && trefs.complete), the name does not exist in the
// referenced package, and we should not write to trefs as that may introduce
// a race.
if !ok && !trefs.complete {
n := b.nodes[sym.Package]
if n == nil {
// We should always have IndexID in our node set, because symbol references
// should only be recorded for packages that actually exist in the import graph.
//
// However, it is not easy to prove this (typerefs are serialized and
// deserialized), so make this code temporarily defensive while we are on a
// point release.
//
// TODO(rfindley): in the future, we should turn this into an assertion.
bug.Reportf("missing reference to package %s", b.s.view.pkgIndex.PackageID(sym.Package)) <---- here
return nil
}This stack vcyB-g was reported by telemetry:
gopls/buggolang.org/x/tools/gopls/internal/util/bug.report:+35golang.org/x/tools/gopls/internal/util/bug.Reportf:+1golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).getOneTransitiveRefLocked:+32golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).getTransitiveRefs:+22golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).evaluatePackageHandle:+129golang.org/x/tools/gopls/internal/cache.(*Snapshot).getPackageHandles.func2.1:+8golang.org/x/sync/errgroup.(*Group).Go.func1:+3runtime.goexit:+0
golang.org/x/tools/gopls@v0.17.1 go1.23.2 linux/amd64 vscode (2)
Dups: DvVGNw lDBj5Q
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/telemetry-wins