-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: "package name is %q, want %q" bug in typeCheckBatch.importPackage #64235
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
Comments
Would love to see the error message for this one. |
Since we added this bug report specifically because we couldn't figure it out, I don't think we're going to make easy progress without the content. I'm not sure what to do about this, but it's not going to get resolved for v0.15.0. |
The 15.0-pre2 stack I just appended to the original node implicates this statement:
|
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
According to the tty output of the stacks command, we had nearly 200 reports of these stacks this week alone. A lot! |
This stack
|
The stack above is not the GOPACKAGESDRIVER case, interestingly. |
This stack
|
Change https://go.dev/cl/643778 mentions this issue: |
After several hours of attempts, I am yet again unable to reproduce golang/go#64235. Add additional filtering of bug reports to try to narrow down potential root causes. For golang/go#64235 Change-Id: I30abd08f01ebea221a2ff13bceb4823ae3ac470a Reviewed-on: https://go-review.googlesource.com/c/tools/+/643778 Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
fcc9d81f7 internal/telemetry/cmd/stacks: anchored literals 684910f57 internal/telemetry/cmd/stacks: fix distinctStacks d5cd1f892 gopls: add WorkspaceFiles option 30bd6fdf3 internal/telemetry/cmd/stacks: move dry run checks down e4adc385a internal/telemetry/cmd/stacks: remove Issue.predicateText 8bf2b65e4 gopls/internal/cache: add more debugging for golang/go#64235 7479e1b98 internal/telemetry/cmd/stacks: test predicates 726ba3201 internal/telemetry/cmd/stacks: minor tweaks 9f4a509fb gopls/internal/telemetry/cmd/stacks: add dry run flag 38d063139 gopls/internal/test: update hover test to be tolerant proxy changes git-subtree-dir: golang.org/x/tools git-subtree-split: fcc9d81f7cff5c606414ca0cf218b7d0f7db991f
The recent stack MP8B4Q is from a refinement indicating that |
This failure mode is possible if:
Because then go/types will set the package name from the file. Unfortunately, I can't reproduce this: I can get go/packages to list packages with CompiledGoFiles and no name, but only if all the files in the package have a missing or broken So, this looks like another case where the gopls logic clearly makes an assumption that it should not (the input package name is the same as the output package name), but we can't figure out how that invalid assumption is exercised. |
This stack
|
This stack
5MRL7A
,_ZM1lw
was reported by telemetry:cache.(*typeCheckBatch).importPackage.func1:19 is
The related issue #63822 appears to have the same root cause: there are duplicate package paths in the export data manifest; see #63822 (comment).
This stack
PXUK4g
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.(*typeCheckBatch).importPackage.func1:+14
golang.org/x/tools/internal/gcimporter.iimportCommon:+124
golang.org/x/tools/internal/gcimporter.IImportShallow:+3
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importPackage:+57
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).getImportPackage:+56
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Reported using golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
This stack
aiQRfw
was reported by telemetry:Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: ebxaEQ 2vh0nQ
This stack
KVl6Kg
was reported by telemetry:Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: Ar_rPw 33irXg PXUK4g ptgmiQ j64HJw FjuvhQ rlqkaQ
Dups without stacks (too numerous): T YioIw
Dups: 8lUnNg nHnxwA C0oOoQ orz9eg LWE90w b-ZEYg lz1QUA JtyMWA JITKgg MP8B4Q n5Nrkw vIomOQ HfwAjw URzRLA HvwCZQ KkBf4g
The text was updated successfully, but these errors were encountered: