Skip to content

x/tools/gopls: nil *types.Package panic in testKind #73096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adonovan opened this issue Mar 28, 2025 · 0 comments
Closed

x/tools/gopls: nil *types.Package panic in testKind #73096

adonovan opened this issue Mar 28, 2025 · 0 comments
Assignees
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

#!stacks
"sigpanic" && "testfuncs.testKind:+12"

Issue created by stacks.

Our old nemeses unsafe.Pointer/error:

func testKind(sig *types.Signature) (*types.TypeName, bool) {
...
	named, ok := ptr.Elem().(*types.Named)
	if !ok || named.Obj().Pkg().Path() != "testing" { <---- panic

This stack V08TKg was reported by telemetry:

golang.org/x/tools/gopls@v0.17.0 go1.23.2 darwin/arm64 other (5)
@adonovan adonovan added gopls Issues related to the Go language server, gopls. gopls/telemetry-wins NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository. labels Mar 28, 2025
@adonovan adonovan changed the title x/tools/gopls: bug in NewIndex x/tools/gopls: nil *types.Package panic in testKind Mar 28, 2025
@gopherbot gopherbot added this to the Unreleased milestone Mar 28, 2025
@adonovan adonovan self-assigned this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants