Closed
Description
#!stacks
"panicdottypeI" && "renameImports:+83"
Issue created by stacks.
for _, imp := range f.File.Imports {
if imp.Name != nil {
continue // has explicit local name
}
if rdeps[id].DepsByImpPath[metadata.UnquoteImportPath(imp)] != mp.ID {
continue // not the import we're looking for
}
pkgname := pkg.TypesInfo().Implicits[imp].(*types.PkgName) // <---- panicdottypeI here
This stack SRoMsA
was reported by telemetry:
crash/crash
runtime.gopanic:+69
runtime.panicdottypeE:=275
runtime.panicdottypeI:+5
golang.org/x/tools/gopls/internal/golang.renameImports:+83
golang.org/x/tools/gopls/internal/golang.renamePackage:+75
golang.org/x/tools/gopls/internal/golang.renamePackageName:+2
golang.org/x/tools/gopls/internal/golang.Rename:+22
golang.org/x/tools/gopls/internal/server.(*server).Rename:+17
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+489
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.17.1 go1.23.4 linux/amd64 vscode (1)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
gabyhelp commentedon Feb 11, 2025
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
gopherbot commentedon Apr 21, 2025
Change https://go.dev/cl/667195 mentions this issue:
gopls/internal/golang: Rename imports: be defensive
gopls/internal/golang: Rename imports: be defensive