#!stacks
"bug.Errorf" && "golang.parseFull"
Issue created by stacks.
// Then simplify stubmethods.StubInfo, which doesn't need a Fset.
func parseFull(ctx context.Context, snapshot *cache.Snapshot, fset *token.FileSet, pos token.Pos) (*parsego.File, token.Pos, error) {
f := fset.File(pos)
if f == nil {
return nil, 0, bug.Errorf("internal error: no file for position %d", pos) <---- reached
}
This stack lzo6-Q
was reported by telemetry:
gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35,+0x393
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2,+0x3b
golang.org/x/tools/gopls/internal/golang.parseFull:+3,+0x1cf
golang.org/x/tools/gopls/internal/golang.findRhsTypeDecl:+11,+0xd3
golang.org/x/tools/gopls/internal/golang.hover:+389,+0x1707
golang.org/x/tools/gopls/internal/golang.Hover:+4,+0x8b
golang.org/x/tools/gopls/internal/server.(*server).Hover:+30,+0x29b
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+335,+0xc57
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func4:+5,+0x73
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func5:+52,+0x68f
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2,+0xbf
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3,+0x8f
runtime.goexit:+0,+0x3
golang.org/x/tools/gopls@v0.19.0 go1.24.3 darwin/arm64 other (2)
Comment From: gopherbot
Change https://go.dev/cl/683536 mentions this issue: gopls/internal/golang: Hover: fix crash on alias to built-in Named