-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: ambiguous error message on ambiguous import #32128
Comments
For reference, the error message is:
The two modules don't require each other at versions that would avoid the ambiguous import. It's hard to capture all this in an error message, but we might recommend requiring specific versions of these modules to avoid the ambiguous import. Related #27899 |
I think if we can recommend an upgrade that resolves the ambiguous import, we should just apply it instead of telling the user to apply it. |
I note that this issue predates the resolution of ugorji/go#299. With that resolved, |
For the errors in that playground link, I believe at least one set of the errors is due to fsnotify not supporting nacl/amd64p32. That might explain all the errors there. |
Change https://golang.org/cl/196298 mentions this issue: |
This consolidates the construction of 'ambiguous import' errors to a single location, ensuring consistency, and lays the groundwork for automatic resolution in the future. While we're at it, change "found" to "found package" to try to make the cause of the error clearer. Updates #32128 Updates #27899 Change-Id: I14a93593320e5c60d20b0eb686d0d5355763c30c Reviewed-on: https://go-review.googlesource.com/c/go/+/196298 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Any way to resolve -- ambiguous import: found package time in multiple modules: |
What version of Go are you using (
go version
)?1.12
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I deal with a problem of ambiguous module import when I try to import
github.com/spf13/[email protected]
andgithub.com/gin-gonic/[email protected]
https://play.golang.org/p/NwzVwWsOjbO
What did you expect to see?
@thepudds (thx to him for his support) has advised me to open a issue to have clearer diagnostic message or a simpler solution.
the proposed solution, that works for me, is:
go get github.com/ugorji/go/codec@none
https://groups.google.com/forum/#!topic/golang-nuts/0mJh8SkaomA
The text was updated successfully, but these errors were encountered: