Skip to content
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

x/tools/gopls: "go/packages failed to return non-test standalone package" bug (reported by telemetry) #66204

Open
adonovan opened this issue Mar 8, 2024 · 4 comments
Labels
gopls/metadata Issues related to metadata loading in gopls 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

adonovan commented Mar 8, 2024

This stack Cd4-Eg was reported by telemetry:

(*Snapshot).load:+140 is:

		if standalonePkg == nil {
			return errorf("internal error: go/packages failed to return non-test standalone package")
		}
gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36
golang.org/x/tools/gopls/internal/golang.selectPackageForFile:+1
golang.org/x/tools/gopls/internal/golang.NarrowestPackageForFile:+1
golang.org/x/tools/gopls/internal/golang.SemanticTokens:+1
golang.org/x/tools/gopls/internal/server.(*server).semanticTokens:+20
golang.org/x/tools/gopls/internal/server.(*server).SemanticTokensFull:+1
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+511
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.15.1 go1.22.0 darwin/amd64 coc.nvim,other,vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Dups: Qo7Tew sWoL1Q uOUllg 8uqagQ

@adonovan adonovan added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. gopls/telemetry-wins gopls/metadata Issues related to metadata loading in gopls labels Mar 8, 2024
@gopherbot gopherbot added this to the Unreleased milestone Mar 8, 2024
@adonovan adonovan modified the milestones: Unreleased, gopls/v0.16.0 Mar 8, 2024
@adonovan
Copy link
Member Author

This stack Qo7Tew was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36
golang.org/x/tools/gopls/internal/golang.selectPackageForFile:+1
golang.org/x/tools/gopls/internal/golang.NarrowestPackageForFile:+1
golang.org/x/tools/gopls/internal/golang.CodeActions:+65
golang.org/x/tools/gopls/internal/server.(*server).CodeAction:+95
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+160
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.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 2, 2024

This stack sWoL1Q was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36
golang.org/x/tools/gopls/internal/cache.(*Snapshot).orphanedFileDiagnostics:+13
golang.org/x/tools/gopls/internal/cache.(*Session).OrphanedFileDiagnostics:+50
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews:+54
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2:+1
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.2 go1.22.1 darwin/arm64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 8, 2024

This stack uOUllg was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+136
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36
golang.org/x/tools/gopls/internal/cache.(*Snapshot).resolveImportGraph:+11
golang.org/x/tools/gopls/internal/cache.(*Snapshot).getImportGraph.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.22.1 darwin/arm64 other,vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented May 3, 2024

This stack 8uqagQ was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*Snapshot).load:+140
golang.org/x/tools/gopls/internal/cache.(*Snapshot).MetadataForFile:+36
golang.org/x/tools/gopls/internal/golang.NarrowestMetadataForFile:+1
golang.org/x/tools/gopls/internal/server.goLinks:+16
golang.org/x/tools/gopls/internal/server.(*server).DocumentLink:+14
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+291
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.15.3 go1.22.1 linux/amd64 vscode,vscode-insiders (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/metadata Issues related to metadata loading in gopls 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