Update clap to version 4 (#1745)

* Bump to clap4

* Adjust to clap 4 style

* Remove two more deprecated occurences of clap macro

* Remove "deprecated" feature from clap

* Update cargo lock

* Fix group name

* More skipped group names
This commit is contained in:
Sebastian Kunert
2022-10-18 13:30:22 +02:00
committed by GitHub
parent 8cb818687d
commit 975403e802
9 changed files with 465 additions and 749 deletions
+7 -7
View File
@@ -20,7 +20,7 @@ use std::path::PathBuf;
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Key management CLI utilities
#[clap(subcommand)]
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
/// Build a chain specification.
@@ -52,7 +52,7 @@ pub enum Subcommand {
/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[clap(subcommand)]
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
/// Try some testing command against a specified runtime state.
@@ -60,16 +60,16 @@ pub enum Subcommand {
}
#[derive(Debug, clap::Parser)]
#[clap(
#[command(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
)]
pub struct Cli {
#[clap(subcommand)]
#[command(subcommand)]
pub subcommand: Option<Subcommand>,
#[clap(flatten)]
#[command(flatten)]
pub run: cumulus_client_cli::RunCmd,
/// Disable automatic hardware benchmarks.
@@ -79,11 +79,11 @@ pub struct Cli {
///
/// The results are then printed out in the logs, and also sent as part of
/// telemetry, if telemetry is enabled.
#[clap(long)]
#[arg(long)]
pub no_hardware_benchmarks: bool,
/// Relay chain arguments
#[clap(raw = true)]
#[arg(raw = true)]
pub relaychain_args: Vec<String>,
}