Skip to content

Commit

Permalink
chore: Migrate all canisters to clap 4 (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihailjianu1 authored Oct 18, 2024
1 parent 4bed17b commit ee61d50
Show file tree
Hide file tree
Showing 74 changed files with 188 additions and 193 deletions.
46 changes: 22 additions & 24 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 rs/backup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DEPENDENCIES = [
"//rs/types/types",
"@crate_index//:anyhow",
"@crate_index//:chrono",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:rand",
"@crate_index//:reqwest",
"@crate_index//:serde",
Expand Down
2 changes: 1 addition & 1 deletion rs/backup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation.workspace = true
[dependencies]
anyhow = { workspace = true }
chrono = { workspace = true }
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
ic-config = { path = "../config" }
ic-crypto-utils-threshold-sig-der = { path = "../crypto/utils/threshold_sig_der" }
ic-logger = { path = "../monitoring/logger" }
Expand Down
1 change: 1 addition & 0 deletions rs/backup/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use clap::Parser;
use ic_types::{PrincipalId, SubnetId};
use std::path::PathBuf;

#[derive(Clone)]
pub struct ClapSubnetId(pub SubnetId);

impl std::str::FromStr for ClapSubnetId {
Expand Down
2 changes: 1 addition & 1 deletion rs/bitcoin/adapter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DEPENDENCIES = [
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"@crate_index//:bitcoin",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:futures",
"@crate_index//:hashlink",
"@crate_index//:hex",
Expand Down
2 changes: 1 addition & 1 deletion rs/bitcoin/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation.workspace = true

[dependencies]
bitcoin = { workspace = true }
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
futures = { workspace = true }
hashlink = "0.8.0"
hex = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rs/boundary_node/systemd_journal_gatewayd_shim/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEPENDENCIES = [
"//rs/async_utils",
"@crate_index//:anyhow",
"@crate_index//:axum",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:http",
"@crate_index//:itertools",
"@crate_index//:reqwest",
Expand Down
2 changes: 1 addition & 1 deletion rs/https_outcalls/adapter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DEPENDENCIES = [
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"@crate_index//:byte-unit",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:futures",
"@crate_index//:http",
"@crate_index//:http-body-util",
Expand Down
2 changes: 1 addition & 1 deletion rs/https_outcalls/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dependencies]
byte-unit = "4.0.14"
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
futures = { workspace = true }
http = { workspace = true }
http-body-util = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rs/ic_os/dev_test_tools/launch-single-vm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DEPENDENCIES = [
"//rs/registry/subnet_type",
"//rs/tests/driver:ic-system-test-driver",
"//rs/types/types",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:reqwest",
"@crate_index//:serde",
"@crate_index//:slog",
Expand Down
2 changes: 1 addition & 1 deletion rs/ic_os/dev_test_tools/launch-single-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ic-registry-subnet-type = { path = "../../../registry/subnet_type" }
ic-system-test-driver = { path = "../../../tests/driver" }
ic-types = { path = "../../../types/types" }

clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
slog-async = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion rs/ic_os/nss_icos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package(default_visibility = ["//rs:ic-os-pkg"])
DEPENDENCIES = [
# Keep sorted.
"@crate_index//:base64",
"@crate_index//:clap_3_2_25",
"@crate_index//:lazy_static",
"@crate_index//:libc",
"@crate_index//:libnss",
Expand Down
2 changes: 1 addition & 1 deletion rs/ic_os/vsock/guest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package(default_visibility = ["//rs:ic-os-pkg"])
DEPENDENCIES = [
# Keep sorted.
"//rs/ic_os/vsock/vsock_lib:vsock_lib",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
]

MACRO_DEPENDENCIES = []
Expand Down
2 changes: 1 addition & 1 deletion rs/ic_os/vsock/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[target.'cfg(target_os = "linux")'.dependencies]
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
vsock_lib = { path = "../vsock_lib" }
2 changes: 1 addition & 1 deletion rs/nns/inspector/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DEPENDENCIES = [
"//rs/nns/gtc",
"//rs/rust_canisters/stable_reader",
"//rs/types/base_types",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:csv",
"@crate_index//:hex",
"@crate_index//:prost",
Expand Down
2 changes: 1 addition & 1 deletion rs/nns/inspector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"


[dependencies]
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
csv = "1.1"
hex = { workspace = true }
ic-base-types = { path = "../../types/base_types" }
Expand Down
5 changes: 2 additions & 3 deletions rs/nns/inspector/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ use std::{
)]
struct CliArgs {
/// Path to stable the `canister_states` directory
#[clap(parse(from_os_str))]
input: PathBuf,

#[clap(parse(from_os_str), default_value = ".")]
#[clap(default_value = ".")]
output: PathBuf,

/// The location of the "rs" directory. Used to find .proto files.
#[clap(long, parse(from_os_str), default_value = ".")]
#[clap(long, default_value = ".")]
rs: PathBuf,
}

Expand Down
4 changes: 2 additions & 2 deletions rs/orchestrator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rust_library(
"//rs/types/types",
"@crate_index//:backoff",
"@crate_index//:candid",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:exec",
"@crate_index//:get_if_addrs",
"@crate_index//:hex",
Expand Down Expand Up @@ -78,7 +78,7 @@ rust_binary(
# Keep sorted.
":lib",
"//rs/async_utils",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:tokio",
],
)
Expand Down
2 changes: 1 addition & 1 deletion rs/orchestrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ documentation.workspace = true
async-trait = { workspace = true }
backoff = { workspace = true }
candid = { workspace = true }
clap = { version = "3.2.25", features = ["derive"] }
clap = { workspace = true }
exec = "0.3.1"
get_if_addrs = "0.5.3"
hex = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rs/orchestrator/registry_replicator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DEPENDENCIES = [
"//rs/registry/nns_data_provider",
"//rs/registry/routing_table",
"//rs/types/types",
"@crate_index//:clap_3_2_25",
"@crate_index//:clap",
"@crate_index//:prometheus",
"@crate_index//:prost",
"@crate_index//:slog",
Expand Down
Loading

0 comments on commit ee61d50

Please sign in to comment.