From 4fb47a4b972e341d2e537de4f18584b3dc5d71ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 20:42:52 +0000 Subject: [PATCH 1/2] Bump clap from 3.1.18 to 3.2.2 Bumps [clap](https://github.com/clap-rs/clap) from 3.1.18 to 3.2.2. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...v3.2.2) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 28 ++++++++++++++-------------- client/cli/Cargo.toml | 2 +- parachain-template/node/Cargo.toml | 2 +- polkadot-parachain/Cargo.toml | 2 +- test/service/Cargo.toml | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 251d1849b45..078eef2e748 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1084,9 +1084,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.18" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "8e538f9ee5aa3b3963f09a997035f883677966ed50fce0292611927ce6f6d8c6" dependencies = [ "atty", "bitflags", @@ -1101,9 +1101,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.18" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "a7f98063cac4652f23ccda556b8d04347a7fc4b2cff1f7577cc8c6546e0d8078" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -1114,9 +1114,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -1574,7 +1574,7 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 3.1.18", + "clap 3.2.2", "sc-cli", "sc-service", "url", @@ -2182,7 +2182,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 3.1.18", + "clap 3.2.2", "criterion", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -2840,7 +2840,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38 dependencies = [ "Inflector", "chrono", - "clap 3.1.18", + "clap 3.2.2", "comfy-table", "frame-benchmarking", "frame-support", @@ -6484,7 +6484,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 3.1.18", + "clap 3.2.2", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", @@ -7042,7 +7042,7 @@ name = "polkadot-cli" version = "0.9.23" source = "git+https://github.com/paritytech/polkadot?branch=master#3946b81a237992445ac566cbd7c6291bda7321a7" dependencies = [ - "clap 3.1.18", + "clap 3.2.2", "frame-benchmarking-cli", "futures 0.3.21", "log", @@ -7688,7 +7688,7 @@ version = "0.9.220" dependencies = [ "assert_cmd", "async-trait", - "clap 3.1.18", + "clap 3.2.2", "contracts-rococo-runtime", "cumulus-client-cli", "cumulus-client-consensus-aura", @@ -9336,7 +9336,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38b9631d9c162997261e43c886828c" dependencies = [ "chrono", - "clap 3.1.18", + "clap 3.2.2", "fdlimit", "futures 0.3.21", "hex", @@ -12359,7 +12359,7 @@ name = "try-runtime-cli" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38b9631d9c162997261e43c886828c" dependencies = [ - "clap 3.1.18", + "clap 3.2.2", "jsonrpsee", "log", "parity-scale-codec", diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index f9ea950d170..6f1a8ab6cfc 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -clap = { version = "3.1", features = ["derive"] } +clap = { version = "3.2", features = ["derive"] } # Substrate sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/parachain-template/node/Cargo.toml b/parachain-template/node/Cargo.toml index f4ccbe786f1..cb09ac5c450 100644 --- a/parachain-template/node/Cargo.toml +++ b/parachain-template/node/Cargo.toml @@ -14,7 +14,7 @@ name = "parachain-collator" path = "src/main.rs" [dependencies] -clap = { version = "3.1", features = ["derive"] } +clap = { version = "3.2", features = ["derive"] } derive_more = "0.99.2" log = "0.4.17" codec = { package = "parity-scale-codec", version = "3.0.0" } diff --git a/polkadot-parachain/Cargo.toml b/polkadot-parachain/Cargo.toml index f000b70978a..7ccf83aa30f 100644 --- a/polkadot-parachain/Cargo.toml +++ b/polkadot-parachain/Cargo.toml @@ -12,7 +12,7 @@ path = "src/main.rs" [dependencies] async-trait = "0.1.56" -clap = { version = "3.1", features = ["derive"] } +clap = { version = "3.2", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0" } futures = { version = "0.3.1", features = ["compat"] } hex-literal = "0.3.4" diff --git a/test/service/Cargo.toml b/test/service/Cargo.toml index e2c59224d22..e51c5bb52ae 100644 --- a/test/service/Cargo.toml +++ b/test/service/Cargo.toml @@ -47,7 +47,7 @@ sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "mast sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -clap = { version = "3.1", features = ["derive"] } +clap = { version = "3.2", features = ["derive"] } tracing = "0.1.25" # Polkadot From 00dcea4a35ee119c785af8eb784cbef67d1a0b5d Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 17 Jun 2022 10:51:18 +0200 Subject: [PATCH 2/2] Bump clap to 3.2.5 and fix warnings --- Cargo.lock | 32 +++++++++++++++--------------- client/cli/Cargo.toml | 2 +- client/cli/src/lib.rs | 7 +++---- parachain-template/node/Cargo.toml | 2 +- parachain-template/node/src/cli.rs | 8 ++++---- polkadot-parachain/Cargo.toml | 2 +- polkadot-parachain/src/cli.rs | 4 ++-- test/service/Cargo.toml | 2 +- test/service/src/cli.rs | 14 ++++++------- 9 files changed, 36 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 078eef2e748..488234b74ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1084,16 +1084,16 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.2" +version = "3.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e538f9ee5aa3b3963f09a997035f883677966ed50fce0292611927ce6f6d8c6" +checksum = "d53da17d37dba964b9b3ecb5c5a1f193a2762c700e6829201e645b9381c99dc7" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap 0.15.0", @@ -1101,9 +1101,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.2.2" +version = "3.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f98063cac4652f23ccda556b8d04347a7fc4b2cff1f7577cc8c6546e0d8078" +checksum = "c11d40217d16aee8508cc8e5fde8b4ff24639758608e5374e731b53f85749fb9" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -1574,7 +1574,7 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 3.2.2", + "clap 3.2.5", "sc-cli", "sc-service", "url", @@ -2182,7 +2182,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 3.2.2", + "clap 3.2.5", "criterion", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -2840,7 +2840,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38 dependencies = [ "Inflector", "chrono", - "clap 3.2.2", + "clap 3.2.5", "comfy-table", "frame-benchmarking", "frame-support", @@ -5311,9 +5311,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "oorandom" @@ -6484,7 +6484,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 3.2.2", + "clap 3.2.5", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", @@ -7042,7 +7042,7 @@ name = "polkadot-cli" version = "0.9.23" source = "git+https://github.com/paritytech/polkadot?branch=master#3946b81a237992445ac566cbd7c6291bda7321a7" dependencies = [ - "clap 3.2.2", + "clap 3.2.5", "frame-benchmarking-cli", "futures 0.3.21", "log", @@ -7688,7 +7688,7 @@ version = "0.9.220" dependencies = [ "assert_cmd", "async-trait", - "clap 3.2.2", + "clap 3.2.5", "contracts-rococo-runtime", "cumulus-client-cli", "cumulus-client-consensus-aura", @@ -9336,7 +9336,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38b9631d9c162997261e43c886828c" dependencies = [ "chrono", - "clap 3.2.2", + "clap 3.2.5", "fdlimit", "futures 0.3.21", "hex", @@ -12359,7 +12359,7 @@ name = "try-runtime-cli" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#323eecd2de38b9631d9c162997261e43c886828c" dependencies = [ - "clap 3.2.2", + "clap 3.2.5", "jsonrpsee", "log", "parity-scale-codec", @@ -12391,7 +12391,7 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "digest 0.10.3", "rand 0.8.5", "static_assertions", diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 6f1a8ab6cfc..4a95429e168 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -clap = { version = "3.2", features = ["derive"] } +clap = { version = "3.2.5", features = ["derive", "deprecated"] } # Substrate sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index a30ef306c10..dcaea8d3978 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -119,11 +119,11 @@ impl sc_cli::CliConfiguration for PurgeChainCmd { } } -fn validate_relay_chain_url(arg: &str) -> Result<(), String> { +fn validate_relay_chain_url(arg: &str) -> Result { let url = Url::parse(arg).map_err(|e| e.to_string())?; if url.scheme() == "ws" { - Ok(()) + Ok(url) } else { Err(format!( "'{}' URL scheme not supported. Only websocket RPC is currently supported", @@ -148,8 +148,7 @@ pub struct RunCmd { /// EXPERIMENTAL: Specify an URL to a relay chain full node to communicate with. #[clap( long, - parse(try_from_str), - validator = validate_relay_chain_url, + value_parser = validate_relay_chain_url, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two"] ) ] pub relay_chain_rpc_url: Option, diff --git a/parachain-template/node/Cargo.toml b/parachain-template/node/Cargo.toml index cb09ac5c450..02727ed3b0d 100644 --- a/parachain-template/node/Cargo.toml +++ b/parachain-template/node/Cargo.toml @@ -14,7 +14,7 @@ name = "parachain-collator" path = "src/main.rs" [dependencies] -clap = { version = "3.2", features = ["derive"] } +clap = { version = "3.2.5", features = ["derive"] } derive_more = "0.99.2" log = "0.4.17" codec = { package = "parity-scale-codec", version = "3.0.0" } diff --git a/parachain-template/node/src/cli.rs b/parachain-template/node/src/cli.rs index 0d36120a479..2b28e4ce80a 100644 --- a/parachain-template/node/src/cli.rs +++ b/parachain-template/node/src/cli.rs @@ -47,7 +47,7 @@ pub enum Subcommand { #[derive(Debug, Parser)] pub struct ExportGenesisStateCommand { /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. @@ -63,15 +63,15 @@ pub struct ExportGenesisStateCommand { #[derive(Debug, Parser)] pub struct ExportGenesisWasmCommand { /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. - #[clap(short, long)] + #[clap(short, long, action)] pub raw: bool, /// The name of the chain for that the genesis wasm file should be exported. - #[clap(long)] + #[clap(long, action)] pub chain: Option, } diff --git a/polkadot-parachain/Cargo.toml b/polkadot-parachain/Cargo.toml index 7ccf83aa30f..81fe34bceff 100644 --- a/polkadot-parachain/Cargo.toml +++ b/polkadot-parachain/Cargo.toml @@ -12,7 +12,7 @@ path = "src/main.rs" [dependencies] async-trait = "0.1.56" -clap = { version = "3.2", features = ["derive"] } +clap = { version = "3.2.5", features = ["derive", "deprecated"] } codec = { package = "parity-scale-codec", version = "3.0.0" } futures = { version = "0.3.1", features = ["compat"] } hex-literal = "0.3.4" diff --git a/polkadot-parachain/src/cli.rs b/polkadot-parachain/src/cli.rs index 31ecb8a5aa0..b215a27a83c 100644 --- a/polkadot-parachain/src/cli.rs +++ b/polkadot-parachain/src/cli.rs @@ -68,7 +68,7 @@ pub enum Subcommand { #[derive(Debug, Parser)] pub struct ExportGenesisStateCommand { /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. @@ -84,7 +84,7 @@ pub struct ExportGenesisStateCommand { #[derive(Debug, Parser)] pub struct ExportGenesisWasmCommand { /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. diff --git a/test/service/Cargo.toml b/test/service/Cargo.toml index e51c5bb52ae..d7929f7e5c2 100644 --- a/test/service/Cargo.toml +++ b/test/service/Cargo.toml @@ -47,7 +47,7 @@ sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "mast sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -clap = { version = "3.2", features = ["derive"] } +clap = { version = "3.2.5", features = ["derive", "deprecated"] } tracing = "0.1.25" # Polkadot diff --git a/test/service/src/cli.rs b/test/service/src/cli.rs index 13995d6ed30..14c7a3a8af1 100644 --- a/test/service/src/cli.rs +++ b/test/service/src/cli.rs @@ -29,34 +29,34 @@ pub struct ExportGenesisStateCommand { pub parachain_id: u32, /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. - #[clap(short, long)] + #[clap(short, long, action)] pub raw: bool, /// The name of the chain for that the genesis state should be exported. - #[clap(long)] + #[clap(long, action)] pub chain: Option, } /// Command for exporting the genesis wasm file. #[derive(Debug, Parser)] pub struct ExportGenesisWasmCommand { - #[clap(default_value_t = 2000u32)] + #[clap(default_value_t = 2000u32, action)] pub parachain_id: u32, /// Output file name or stdout if unspecified. - #[clap(parse(from_os_str))] + #[clap(action)] pub output: Option, /// Write output in binary. Default is to write in hex. - #[clap(short, long)] + #[clap(short, long, action)] pub raw: bool, /// The name of the chain for that the genesis wasm file should be exported. - #[clap(long)] + #[clap(long, action)] pub chain: Option, } #[derive(Subcommand, Debug)]