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
Upgrade github.com/urfave/cli to v2 #6628
Conversation
Skipping CI for Draft Pull Request. |
cc5b1b6
to
a042162
Compare
@AkihiroSuda Do we have flags that take a negative value as a string? Seems the issue in go.mod (urfave/cli#1092) was raised for runc. |
Name: "run", | ||
Usage: "run a container", | ||
ArgsUsage: "[flags] Image|RootFS ID [COMMAND] [ARG...]", | ||
SkipArgReorder: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an equivalent for v2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the flag reordering is removed from v2.
SkipArgReorder was added to allow users to skip the argument reordering. This is useful if you want to consider all "flags" after an argument as arguments rather than flags (the default behavior of the stdlib flag library). This is backported functionality from the removal of the flag reordering in the unreleased version 2
Given the tradeoffs I think we should remove support for flag reordering.
While urfave/cli doesn't have any issues, it is better to keep our dependencies up-to-date. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
Build succeeded.
|
I feel https://github.com/spf13/cobra is more actively maintained and has better shell completion support (bash, zsh, fish, powershell) |
Interesting. I honestly don't have strong opinions regarding cobra vs. urfave/cli. Let me take a look. |
@AkihiroSuda - Do we need to go to v2 first though? So should we still take this? |
I think, we don't have to do v1 -> v2 migration before urfave/cli -> cobra migration. |
While urfave/cli doesn't have any issues, it is better to keep our dependencies up-to-date.
Signed-off-by: Kazuyoshi Kato katokazu@amazon.com