Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@samcoe
Copy link
Contributor

@samcoe samcoe commented Oct 20, 2020

Update spf13/cobra to v1.1.1

Cobra diff

Biggest cobra change since v1.0.0 is a reworking of all shell completion generation which should address a number of our issues.

closes #1775
closes #671

cc #1703
cc #716
cc #695

@samcoe samcoe self-assigned this Oct 20, 2020
@samcoe samcoe changed the title Update spf13/cobra to v1.1.1 Update Cobra to v1.1.1 Oct 20, 2020
@samcoe samcoe marked this pull request as ready for review October 20, 2020 09:18
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I'm happy to see completion script issues addressed.

The upgrade looks good, but I'm worried about the sudden proliferation of so many extra dependencies listed in our go.sum file. Let's spend some time looking over them (i.e. where do they come from?) before we merge this!

@samcoe
Copy link
Contributor Author

samcoe commented Oct 21, 2020

@mislav that is a good point. I did some investigating and all the additions stem from the upgrade of spf13/viper from 1.4.0 to 1.7.0 that is included with spf13/cobra.

Viper diff

The upgrade also has patch updates to spf13/pflag from v1.0.3 to v1.0.5 and gopkg.in/yaml.v2 from v2.2.2 to v2.2.8. Neither of which update their dependencies.

Pflag diff
Yaml diff

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that Viper is only used in spf13/cobra/cmd, which we don't use, but Viper and its sub-dependencies will still be listed in our go.sum even though it's technically not our runtime dependency. 😕

I guess this added bloat to go.sum is fine for now, but let's explore venues of migrating off of Cobra in the future.

@samcoe samcoe merged commit 093d0ff into trunk Oct 22, 2020
@samcoe samcoe deleted the update-cobra branch October 22, 2020 08:35
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

Successfully merging this pull request may close these issues.

tab-completions for powershell don't work on the root command No space after tab-completing a gh command in bash

2 participants