Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Bump clap from 3.1.18 to 3.2.2 (#1370)
Browse files Browse the repository at this point in the history
* 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](clap-rs/clap@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] <support@github.com>

* Bump clap to 3.2.5 and fix warnings

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
  • Loading branch information
dependabot[bot] and skunert committed Jun 17, 2022
1 parent ebfa19a commit 2e52ce2
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 39 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
clap = { version = "3.1", features = ["derive"] }
clap = { version = "3.2.5", features = ["derive", "deprecated"] }

# Substrate
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
7 changes: 3 additions & 4 deletions client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Url, String> {
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",
Expand All @@ -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<Url>,
Expand Down
2 changes: 1 addition & 1 deletion parachain-template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name = "parachain-collator"
path = "src/main.rs"

[dependencies]
clap = { version = "3.1", 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" }
Expand Down
8 changes: 4 additions & 4 deletions parachain-template/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,

/// Write output in binary. Default is to write in hex.
Expand All @@ -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<PathBuf>,

/// 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<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path = "src/main.rs"

[dependencies]
async-trait = "0.1.56"
clap = { version = "3.1", 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"
Expand Down
4 changes: 2 additions & 2 deletions polkadot-parachain/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,

/// Write output in binary. Default is to write in hex.
Expand All @@ -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<PathBuf>,

/// Write output in binary. Default is to write in hex.
Expand Down
2 changes: 1 addition & 1 deletion test/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5", features = ["derive", "deprecated"] }
tracing = "0.1.25"

# Polkadot
Expand Down
14 changes: 7 additions & 7 deletions test/service/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,

/// 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<String>,
}

/// 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<PathBuf>,

/// 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<String>,
}
#[derive(Subcommand, Debug)]
Expand Down

0 comments on commit 2e52ce2

Please sign in to comment.