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

Upgrade to Clap 4 #725

Closed
YamatoSecurity opened this issue Oct 4, 2022 · 1 comment · Fixed by #817
Closed

Upgrade to Clap 4 #725

YamatoSecurity opened this issue Oct 4, 2022 · 1 comment · Fixed by #817
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@YamatoSecurity
Copy link
Collaborator

先日Clap 4.xがリリースされて、見た目が良くなっているのと、これから4.xが主に維持されるので、アップデートしたいです。

Migrating

Steps:

  1. Upgrade to v3 if you haven't already
  2. Add CLI tests (including example below), -h and --help output at a minimum (recommendation: trycmd for snapshot testing)
  3. If using Builder API: Explicitly set the arg.action(ArgAction::...) on each argument (StoreValue for options and IncOccurrences for flags)
  4. Run cargo check --features clap/deprecated and resolve all deprecation warnings
  5. Upgrade to v4
  6. Update feature flags
  • If default-features = false, run cargo add clap -F help,usage,error-context
  • Run cargo add clap -F wrap_help unless you want to hard code line wraps
  1. Resolve compiler errors
  2. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
  3. At your leisure: resolve new deprecation notices

詳細: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md

@YamatoSecurity YamatoSecurity added the enhancement New feature or request label Oct 4, 2022
@hitenkoku hitenkoku self-assigned this Oct 4, 2022
@hitenkoku hitenkoku added this to the v1.7.1 milestone Oct 4, 2022
hitenkoku added a commit that referenced this issue Oct 4, 2022
@hitenkoku hitenkoku linked a pull request Oct 4, 2022 that will close this issue
@hitenkoku hitenkoku modified the milestones: v1.7.1, v2.0 Oct 8, 2022
@hitenkoku
Copy link
Collaborator

確認しましたが、testが通らない状況になっているので1.7.1での作成は難しいと判断してv2.0に変えました

@kazuminn kazuminn changed the title Upgrage to Clap 4 Upgrade to Clap 4 Oct 27, 2022
hitenkoku added a commit that referenced this issue Nov 19, 2022
hitenkoku added a commit that referenced this issue Nov 19, 2022
hitenkoku added a commit that referenced this issue Nov 19, 2022
@hitenkoku hitenkoku linked a pull request Nov 19, 2022 that will close this issue
@YamatoSecurity YamatoSecurity modified the milestones: v2.0, v1.9.0 Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants