feat: remove deprecated #[clap] attribute #1898
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR addresses issue #1298 by updating the deprecated
#[clap(...)]
attributes to their modern equivalents in clap 4.x. The current codebase uses outdated clap attribute syntax which has been deprecated since version 4.0. This change will help maintain code quality and prevent potential issues in future updates.Fixes #1298
Solution
Updated all instances of deprecated clap attributes across 8 files:
#[clap(...)]
with#[command(...)]
for struct/enum level attributes#[clap(...)]
with#[arg(...)]
for field level attributesflatten
andsubcommand
attributes to use#[command(...)]
Files modified:
crates/prover/scripts/build_compress_vks.rs
crates/prover/scripts/build_groth16_bn254.rs
crates/prover/scripts/build_plonk_bn254.rs
crates/prover/scripts/post_trusted_setup.rs
crates/cli/src/bin/cargo-prove.rs
crates/cli/src/commands/build.rs
crates/cli/src/commands/vkey.rs
crates/build/src/lib.rs
These changes maintain the same functionality while using the current recommended syntax from the clap crate.
PR Checklist