cmd/go, x/tools/go/packages: confusing go list repeated package with different values error #30519
On go 1.12
Reproducible repo at https://github.com/nhooyr/gomod
I'm importing a main package as a side effect import which is an error. I'm aware this is wrong, but the error message should be clearer. If you try and load the mod with
Which is a very confusing error.
I debugged this a bit and it looks like
If you run
Thing is, these two listing are actually different. If you run with the
Not sure what's causing this difference between the two listings.
Furthermore, this goes away if you use
I can reproduce this in other cases as well e.g. when using an internal package where it isn't accessible (in this case both all and ./... produce the same output).
To summarize, the
The text was updated successfully, but these errors were encountered:
Make it slightly more clear that this is not a user error, but an internal error. Updates golang/go#30519 Change-Id: I7adb3b5bb1548eab8e46db48946d55f9d59a4311 Reviewed-on: https://go-review.googlesource.com/c/tools/+/168657 Run-TryBot: Michael Matloob <email@example.com> Reviewed-by: Ian Cottrell <firstname.lastname@example.org>