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

Closed
adonovan opened this issue Mar 8, 2024 · 12 comments
Assignees
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

#!stacks
"bug.Errorf" && "cache.(*Snapshot).load:+144"

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 z4D1-Q OMrJgg 9i4Ang F8AI5A zlK7rQ f6wMYA IJPylQ

@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.

@findleyr findleyr modified the milestones: gopls/v0.16.0, gopls/v0.17.0 May 23, 2024
@adonovan
Copy link
Member Author

adonovan commented Aug 5, 2024

This stack z4D1-Q 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:+144
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.(*server).diagnoseChangedFiles:+33
golang.org/x/tools/gopls/internal/server.(*server).diagnoseSnapshot:+25
golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.16.1 go1.22.4 darwin/arm64 vscode (1)

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

@adonovan
Copy link
Member Author

This stack OMrJgg 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:+144
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:+87
golang.org/x/tools/gopls/internal/server.(*server).CodeAction:+106
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.16.1 go1.22.4 darwin/arm64 vscode (1)

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

@adonovan
Copy link
Member Author

adonovan commented Sep 3, 2024

This stack 9i4Ang 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:+144
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:+55
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.16.1 go1.23.0 darwin/arm64 vscode (1)

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

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/621859 mentions this issue: gopls/internal/cache: avoid reporting bugs when go/packages has errors

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

3 participants