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/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).getOneTransitiveRefLocked:+32
golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).getTransitiveRefs:+22
golang.org/x/tools/gopls/internal/cache.(*packageHandleBuilder).evaluatePackageHandle:+129
golang.org/x/tools/gopls/internal/cache.(*Snapshot).getPackageHandles.func2.1:+8
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.17.1 go1.23.2 linux/amd64 vscode (2)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
gabyhelp commentedon Jan 20, 2025
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)