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/go/packages: Unexpected package creation during export data loading #45218

gordonklaus opened this issue Mar 24, 2021 · 1 comment


Copy link

@gordonklaus gordonklaus commented Mar 24, 2021

What version of Go are you using (go version)?

go version go1.16.2 darwin/amd64

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")

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 in Config.Mode.

Copy link

@cagedmantis cagedmantis commented Mar 31, 2021

/cc @matloob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants