-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: "internal error: nil Pkg importing" #33554
Comments
I also ran into this issue today. However, adding Edit: I can confirm that this issue was present in an older x/tools, but no longer present in a more recent rev of x/tools.
|
This seems to be fixed at head (and was able to confirm the fix locally), so I'll close the issue. Let me know if it pops up again. |
From go 1.14, an error occurs: internal error: nil Pkg importing "go/ast" from "github.com/quasilyte/go-consistent [github.com/quasilyte/go-consistent.test]" To fix this, update x/tools: go get golang.org/x/tools && go mod tidy Related: golang/go#33554
From go 1.14, an error occurs: internal error: nil Pkg importing "go/ast" from "github.com/quasilyte/go-consistent [github.com/quasilyte/go-consistent.test]" To fix this, update x/tools: go get golang.org/x/tools && go mod tidy Related: golang/go#33554
From go 1.14, an error occurs: internal error: nil Pkg importing "go/ast" from "github.com/quasilyte/go-consistent [github.com/quasilyte/go-consistent.test]" To fix this, update x/tools: go get golang.org/x/tools && go mod tidy Related: golang/go#33554
I'm now getting this in this context:
results in |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
n/a
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
in the workspace described by:
What did you expect to see?
Test program should print:
What did you see instead?
The error message is coming from
golang.org/x/tools/go/packages.loader.loadPackage
. I think the problem is that I asked forNeedTypes
andNeedImports
but notNeedDeps
, which may or may not make sense. We shouldn't be exiting with an internal error in any case though.cc @matloob
The text was updated successfully, but these errors were encountered: