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

feat(rust): upgrade to clap v4 #3520

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

hargut
Copy link
Contributor

@hargut hargut commented Sep 24, 2022

Current Behavior

clap & clap_complete v3 are used

Proposed Changes

  • upgrade clap to v4.0.0.0-rc.2 & clap_complete to v4.0.0-rc.1
  • address v3 & v4 deprecation warnings
  • transition derives to command/arg
  • deactivate mut_subcommand for "help" (causes runtime error) disable_help_flag and add global help arg
  • unify help templates with new default help styling (lower-/uppercase)

Notes

Changing the about text for the help for subcommands was removed as this is not possible with the new version utilizing mut_subcommand.
Formatting and styling the help is no longer possible the same way as in v3. clap::Command::help_template formats the variables (e.g. {usage}) now with the new style (bold/underlined) but within the template there is no support for bold/underline in custom strings.

Checks

@hargut hargut requested a review from a team as a code owner September 24, 2022 13:58
@hargut
Copy link
Contributor Author

hargut commented Sep 24, 2022

#3506

mrinalwadhwa
mrinalwadhwa previously approved these changes Sep 26, 2022
Copy link
Member

@mrinalwadhwa mrinalwadhwa left a comment

Choose a reason for hiding this comment

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

@hargut Thank you for another awesome Pull Request. The changes look great!

upgrade clap to v4.0.0.0-rc.2 & clap_complete to v4.0.0-rc.1
address v3 & v4 deprecation warnings
transition derives to command/arg
deactivate mut_subcommand for "help" (causes runtime error)
disable_help_flag and add global help arg
unify help templates with new default help styling (lower-/uppercase)
@mergify mergify bot merged commit 120869c into build-trust:develop Sep 26, 2022
@hargut hargut deleted the feature/clap4-initial branch September 27, 2022 11:41
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.

2 participants