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: remove deprecated #[clap] attribute #1898

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Dec 24, 2024

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:

  • Replaced #[clap(...)] with #[command(...)] for struct/enum level attributes
  • Replaced #[clap(...)] with #[arg(...)] for field level attributes
  • Updated flatten and subcommand attributes to use #[command(...)]

Files modified:

  1. crates/prover/scripts/build_compress_vks.rs
  2. crates/prover/scripts/build_groth16_bn254.rs
  3. crates/prover/scripts/build_plonk_bn254.rs
  4. crates/prover/scripts/post_trusted_setup.rs
  5. crates/cli/src/bin/cargo-prove.rs
  6. crates/cli/src/commands/build.rs
  7. crates/cli/src/commands/vkey.rs
  8. crates/build/src/lib.rs

These changes maintain the same functionality while using the current recommended syntax from the clap crate.

PR Checklist

  • Added Tests
    • No new tests needed as this is a syntax update only
  • Added Documentation
    • No documentation changes needed as this is a syntax update only
  • Breaking changes
    • No breaking changes: the functionality remains the same

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.

[feat] remove deprecated #[clap] attribute
1 participant