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

How does etcd play a role in cobra? #957

Closed
ghost opened this issue Sep 10, 2019 · 5 comments
Closed

How does etcd play a role in cobra? #957

ghost opened this issue Sep 10, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2019

For example, how does etcd play a role in cobra?

https://github.com/spf13/cobra/blob/master/go.sum#L5

If this is a mistake, perhaps there are others and maybe go mod tidy would help?

If I'm completely off-base, sorry about that :)

@eparis
Copy link
Collaborator

eparis commented Sep 10, 2019

@umarcor I'm not sure why it's in there....

@eparis
Copy link
Collaborator

eparis commented Sep 10, 2019

Not that having the checksum of a random version of etcd hurts anything, I don't know it's listed. It wasn't ever part of cobra.

@umarcor
Copy link
Contributor

umarcor commented Sep 11, 2019

@josdotso, @eparis, file go.sum contains all the dependencies of cobra, recursively. If you want to see which are the explicit/direct dependencies only, you need to look at go.mod. In order to understand why etcd is listed as an indirect dependency, you can use go mod graph:

# go mod graph | grep etcd
github.com/spf13/[email protected] github.com/coreos/[email protected]+incompatible
github.com/spf13/[email protected] github.com/coreos/[email protected]+incompatible

NOTE: alternatively, see 'Dependencies' tab in https://search.gocenter.io/github.com~2Fspf13~2Fcobra/info?version=v0.0.6-0.20190805155617-b80588d523ec

So, etcd and go-etcd seem to be dependencies of viper. These are/were listed in viper's go.mod. You will not find go-etcd in viper's master branch, because it was removed some months ago: spf13/viper@b5bf975#diff-37aff102a57d3d7b797f152915a6dc16

Precisely, PR #953 updates viper to v1.4.0, which will remove go-etcd from cobra's go.sum. See https://github.com/spf13/cobra/pull/953/files#diff-f949e2d81c8076ebbf8af38fcbb72c1f. BTW, @eparis, it'd be good if you could review and hopefully merge #953 (it fixes #938).

Ref spf13/viper#707

@ghost
Copy link
Author

ghost commented Sep 11, 2019

thank you!

@umarcor
Copy link
Contributor

umarcor commented Sep 11, 2019

@josdotso, since it is answered, would you mind closing this issue?

@ghost ghost closed this as completed Sep 12, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants