-
Notifications
You must be signed in to change notification settings - Fork 8k
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
use gin v1.4.0 build error ambiguous import #1897
Comments
@HZ89 What was your fix? |
@bvisness
|
gin v1.4.0 have updated the package https://github.com/gin-gonic/gin/blob/v1.4.0/go.mod |
yes, but use this go.mod, |
Yeah, as far as I can tell the problem is:
- ugorji used to treat /go/codec as a separate module
- some projects (like viper) depended on that module
- ugorji then removed the specific module for /go/codec, making /codec accessible through the /go module instead.
- Gin depended on the latest version of ugorji.
- We hapless few imported both Gin and viper.
So now when /go/codec is imported, it doesn’t know if it should use the old, individual module version, or the new, shared module version. And kerblam.
The replace seems to work fine for me, but I’m still not sure why I can’t replace it with the latest ugorji version. It complains about it being imported twice, which doesn’t seem like an issue to me.
|
@HZ89 thanks! this is solve my problem |
Hi folks, Please see ugorji/go#299 and add your thoughts/ideas/etc. Thanks. |
why cannot just remove "github.com/ugorji/go v1.1.4"? |
FYI: I just released a go-codec production release - version 1.1.7 (finally) First, it resolves the go.mod impasse where we had different import paths (github.com/ugorji/go and github.com/ugorji/go/codec) causing the ambiguous import error. This is now fixed by leveraging import cycles to ensure that either one works well and resolves to the same bits. Please let me know if seeing any issues. If all is well over the next few days, I will close this github issue. |
With issues:
go version: 1.12.5
gin version (or commit ref):
operating system: ubuntu 18.04
Description
When I update gin to v1.4.0 build error:
I google this error got this ugorji/go#279
Screenshots
The text was updated successfully, but these errors were encountered: