x/tools/go/packages: Unexpected package creation during export data loading #45218
Labels
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
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. Both on v0.1.0 and on master.
What did you do?
Load types for a package that has gc export data available.
runtime
is such a package on my system:packages.Load(&packages.Config{Mode: packages.NeedTypes}, "runtime")
https://play.golang.org/p/ObXs_fKb0A2
What did you expect to see?
Nothing, success.
What did you see instead?
A fatal error is logged:
Unexpected package creation during export data loading
I debugged the error and found a workaround: Include
packages.NeedImports
inConfig.Mode
.The text was updated successfully, but these errors were encountered: