-
Notifications
You must be signed in to change notification settings - Fork 2.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
Cobra pull a lot of dependencies through viper #1138
Comments
I went ahead and did that: #1139 It reduced the dependency count in my project from 313 to 148. |
This issue is being marked as stale due to a long period of inactivity |
Can someone merge #1139 ? |
Closed
jen20
added a commit
to jen20/pulumi
that referenced
this issue
Mar 27, 2022
This commit upgrades the usage of Cobra to [v1.4.0][1], which reduces the dependency set by removing the dependency on Viper. The upgrade happens across both `sdk` and `pkg`. Full details on the upgrades upstream in Cobra are available via the release notes, but [2] contains further motivating examples of reduced dependencies via separation of the (rarely used) Cobra bootstrapping CLI and the library itself. [1]: https://github.com/spf13/cobra/releases/tag/v1.4.0 [2]: spf13/cobra#1138
3 tasks
Frassle
added a commit
to pulumi/pulumi
that referenced
this issue
Mar 28, 2022
* deps: Upgrade to Cobra v1.4.0 This commit upgrades the usage of Cobra to [v1.4.0][1], which reduces the dependency set by removing the dependency on Viper. The upgrade happens across both `sdk` and `pkg`. Full details on the upgrades upstream in Cobra are available via the release notes, but [2] contains further motivating examples of reduced dependencies via separation of the (rarely used) Cobra bootstrapping CLI and the library itself. [1]: https://github.com/spf13/cobra/releases/tag/v1.4.0 [2]: spf13/cobra#1138 * Update tests/go.mod Co-authored-by: Fraser Waters <fraser@pulumi.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using Cobra in a project, a lot of dependencies are added that are not actually useful for that project. Those comes through viper, which is used in
cobra/cmd
, that is a CLI tool only useful occasionally for the developer.Those are quite heavy dependencies: Etcd, systemd, protobuf, prometheus, websocket, GRPC ...
Could you add a secondary
go.mod
file in the/cobra
folder ? This would segregate those deps into the CLI tool and avoid having all that in a project using Cobra without Viper.The text was updated successfully, but these errors were encountered: