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

Upgrade clap to v4 #678

Merged
merged 2 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ subxt-codegen = { version = "0.24.0", path = "../codegen" }
# perform node compatibility
subxt-metadata = { version = "0.24.0", path = "../metadata" }
# parse command line args
clap = { version = "3.2.22", features = ["derive"] }
clap = { version = "4.0.8", features = ["derive"] }
# colourful error reports
color-eyre = "0.6.1"
# serialize the metadata
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ use subxt_codegen::DerivesRegistry;
#[derive(Debug, ClapParser)]
pub struct Opts {
/// The url of the substrate node to query for metadata for codegen.
#[clap(name = "url", long, parse(try_from_str))]
#[clap(name = "url", long, value_parser)]
url: Option<Uri>,
/// The path to the encoded metadata file.
#[clap(short, long, parse(from_os_str))]
#[clap(short, long, value_parser)]
file: Option<PathBuf>,
/// Additional derives
#[clap(long = "derive")]
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/compatibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ use subxt_metadata::{
#[derive(Debug, ClapParser)]
pub struct Opts {
/// Urls of the substrate nodes to verify for metadata compatibility.
#[clap(name = "nodes", long, use_delimiter = true, parse(try_from_str))]
#[clap(name = "nodes", long, use_value_delimiter = true, value_parser)]
nodes: Vec<Uri>,
/// Check the compatibility of metadata for a particular pallet.
///
/// ### Note
/// The validation will omit the full metadata check and focus instead on the pallet.
#[clap(long, parse(try_from_str))]
#[clap(long, value_parser)]
pallet: Option<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct Opts {
#[clap(
name = "url",
long,
parse(try_from_str),
value_parser,
default_value = "http://localhost:9933"
)]
url: Uri,
Expand Down