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

update viper to v1.4.0 #953

Merged
merged 1 commit into from Oct 14, 2019
Merged

update viper to v1.4.0 #953

merged 1 commit into from Oct 14, 2019

Conversation

umarcor
Copy link
Contributor

@umarcor umarcor commented Sep 8, 2019

Fix #938
Fix #978

@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Sep 9, 2019

@KowloonZh, @plo-, do you mind testing/reviewing this?

@plo-
Copy link

@plo- plo- commented Sep 10, 2019

Seems ok for me, thanks!

@umarcor umarcor mentioned this pull request Oct 2, 2019
umarcor added a commit to umarcor/cobra that referenced this issue Oct 2, 2019
umarcor added a commit to umarcor/cobra that referenced this issue Oct 2, 2019
umarcor added a commit to umarcor/cobra that referenced this issue Oct 2, 2019
@KowloonZh
Copy link

@KowloonZh KowloonZh commented Oct 6, 2019

Seems ok for me, thanks!

hi, plo

could you please tell my how to testing it.

i failed by use go get github.com/spf13/cobra@a4bc1a0fefe97a46dddf831c9648b18336be751e, either failed by use go get github.com/umarcor/cobra@update-viper.

anyway, i think it will works for me when the viper version is up to 1.4

@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Oct 6, 2019

@KowloonZh you might try temporaly adding replace github.com/spf13/cobra => github.com/umarcor/cobra update-viper to the go.mod file of your project.

@KowloonZh
Copy link

@KowloonZh KowloonZh commented Oct 6, 2019

@KowloonZh you might try temporaly adding replace github.com/spf13/cobra => github.com/umarcor/cobra update-viper to the go.mod file of your project.

thank you very much for help,

i had add replace github.com/spf13/cobra => github.com/umarcor/cobra v0.0.6-0.20190917162959-a4bc1a0fefe9 to the go.mod file, but it not works to me, anything else i missed? my repo link is https://github.com/hulklab/yago

@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Oct 6, 2019

docker run --rm -it golang bash -c "
git clone https://github.com/hulklab/yago
cd yago
go build
"

works here. what are you trying to fix?

@jharshman jharshman added this to the 1.0.0 milestone Oct 7, 2019
@umarcor umarcor mentioned this pull request Oct 8, 2019
@jharshman jharshman added the kind/feature label Oct 14, 2019
@jharshman jharshman self-assigned this Oct 14, 2019
@jharshman jharshman merged commit 8a4b46f into spf13:master Oct 14, 2019
5 checks passed
@KowloonZh
Copy link

@KowloonZh KowloonZh commented Oct 14, 2019

@umarcor
hi, umarcor
thank you at first.

it works fine cause i add the replace statement replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 at the end of go.mod in master branch

i pushed the my branch viper_update and please run the following command, then you can see the problem:

docker run --rm -it golang bash -c "
git clone https://github.com/hulklab/yago
cd yago
git checkout viper_update
go build
"

the error output just like this:

ambiguous import: found github.com/ugorji/go/codec in multiple modules:
	github.com/ugorji/go v1.1.4 (/go/pkg/mod/github.com/ugorji/go@v1.1.4/codec)
	github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f (/go/pkg/mod/github.com/ugorji/go/codec@v0.0.0-20181022190402-e5e69e061d4f)

@umarcor umarcor deleted the update-viper branch Oct 14, 2019
umarcor added a commit to umarcor/cobra that referenced this issue Oct 14, 2019
@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Oct 14, 2019

@KowloonZh, I think that you do need the replace statement indepently of viper being updated to v1.4.0. This is because ugorji/go needs to be updated to v1.1.7: https://github.com/ugorji/go/releases/tag/v1.1.7. Apart from viper v1.4.0, there is another dependency in your go.mod (https://github.com/hulklab/yago/blob/master/go.mod#L14) that is using v1.1.4 of ugorji/go: https://github.com/gin-gonic/gin/blob/v1.4.0/go.mod#L13. Hence, new fixed releases of gin-gonic/gin, spf13/viper and spf13/cobra need to be published before you can remove the replace statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature
Projects
None yet
4 participants