Skip to content

Upgrade clap 2.x to 4.x - #118

Open
JacobHayes wants to merge 1 commit into
visioncortex:masterfrom
JacobHayes:upgrade-clap-v4
Open

Upgrade clap 2.x to 4.x#118
JacobHayes wants to merge 1 commit into
visioncortex:masterfrom
JacobHayes:upgrade-clap-v4

Conversation

@JacobHayes

Copy link
Copy Markdown

Summary

  • Upgrades clap from 2.33.3 to 4.x to address vulnerabilities in transitive dependencies (e.g. atty)
  • Migrates CLI code to the clap 4 API (AppCommand, Arg::with_nameArg::new, .value_of().get_one::<String>(), etc.)
  • No functional changes to CLI behavior

Test plan

  • cargo check passes
  • Manual smoke test: cargo run -- --input <img> --output <out.svg> produces equivalent output

clap 2.33.3 depends on atty, which is unmaintained and has a
soundness issue. clap 4.x removes this dependency.

Migrates the CLI to the clap 4 API:
- App -> Command
- Arg::with_name -> Arg::new
- .short("x") -> .short('x')
- .takes_value(true) removed (now the default)
- .value_of() -> .get_one::<String>()
@tyt2y3
tyt2y3 force-pushed the master branch 7 times, most recently from 21c8047 to fd9cdb0 Compare March 23, 2026 15:30
@tyt2y3
tyt2y3 force-pushed the master branch 4 times, most recently from 3aef551 to 7d754e1 Compare August 1, 2026 22:45
@tyt2y3
tyt2y3 force-pushed the master branch 14 times, most recently from f0b04ae to 845f6a1 Compare August 8, 2026 21:25
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.

1 participant