From dbf0cc355070fc6623975209b41962ff9860356b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20Tomi=C4=87?= Date: Mon, 8 Jan 2024 16:58:17 +0100 Subject: [PATCH] feat(cargo): consolidate versions and project organization (#35) * feat(cargo): consolidate versions and project organization * Update bazel lock --- Cargo.Bazel.lock | 462 ++++++++++++++-------------- Cargo.lock | 110 +++---- Cargo.toml | 7 + rs/cli/Cargo.toml | 14 +- rs/decentralization/Cargo.toml | 7 +- rs/ic-canisters/Cargo.toml | 7 +- rs/ic-management-backend/Cargo.toml | 7 +- rs/ic-management-types/Cargo.toml | 7 +- rs/log-fetcher/Cargo.toml | 9 +- rs/np-notifications/Cargo.toml | 20 +- rs/slack-notifications/Cargo.toml | 7 +- 11 files changed, 348 insertions(+), 309 deletions(-) diff --git a/Cargo.Bazel.lock b/Cargo.Bazel.lock index 594d4cb70..06aca940d 100644 --- a/Cargo.Bazel.lock +++ b/Cargo.Bazel.lock @@ -1,5 +1,5 @@ { - "checksum": "9c3fbb84eb2882fecf91907a72fd5abaee7cbb63558a81a6222a30fc8ddb6afb", + "checksum": "c02ec9d24a31d5f25804ffe28f52fb2be2483fc64b5a77f32d69a29f5b7eac01", "crates": { "actix 0.13.1": { "name": "actix", @@ -11404,6 +11404,235 @@ }, "license": "MIT" }, + "dre 0.1.0": { + "name": "dre", + "version": "0.1.0", + "repository": null, + "targets": [ + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": null, + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "actix-web 4.4.1", + "target": "actix_web" + }, + { + "id": "anyhow 1.0.79", + "target": "anyhow" + }, + { + "id": "candid 0.9.11", + "target": "candid" + }, + { + "id": "chrono 0.4.31", + "target": "chrono" + }, + { + "id": "clap 4.4.13", + "target": "clap" + }, + { + "id": "clap-num 1.0.2", + "target": "clap_num" + }, + { + "id": "colored 2.1.0", + "target": "colored" + }, + { + "id": "cryptoki 0.3.1", + "target": "cryptoki" + }, + { + "id": "dialoguer 0.10.4", + "target": "dialoguer" + }, + { + "id": "dirs 5.0.1", + "target": "dirs" + }, + { + "id": "dotenv 0.15.0", + "target": "dotenv" + }, + { + "id": "dre 0.1.0", + "target": "build_script_build" + }, + { + "id": "edit 0.1.5", + "target": "edit" + }, + { + "id": "flate2 1.0.28", + "target": "flate2" + }, + { + "id": "futures 0.3.30", + "target": "futures" + }, + { + "id": "ic-agent 0.27.0", + "target": "ic_agent" + }, + { + "id": "ic-base-types 0.9.0", + "target": "ic_base_types" + }, + { + "id": "ic-canister-client 0.9.0", + "target": "ic_canister_client" + }, + { + "id": "ic-nns-constants 0.9.0", + "target": "ic_nns_constants" + }, + { + "id": "ic-nns-governance 0.9.0", + "target": "ic_nns_governance" + }, + { + "id": "ic-protobuf 0.9.0", + "target": "ic_protobuf" + }, + { + "id": "ic-registry-keys 0.9.0", + "target": "ic_registry_keys" + }, + { + "id": "ic-registry-nns-data-provider 0.9.0", + "target": "ic_registry_nns_data_provider" + }, + { + "id": "ic-registry-transport 0.9.0", + "target": "ic_registry_transport" + }, + { + "id": "ic-sys 0.9.0", + "target": "ic_sys" + }, + { + "id": "itertools 0.11.0", + "target": "itertools" + }, + { + "id": "keyring 2.3.1", + "target": "keyring" + }, + { + "id": "log 0.4.20", + "target": "log" + }, + { + "id": "pretty_env_logger 0.5.0", + "target": "pretty_env_logger" + }, + { + "id": "prost 0.12.3", + "target": "prost" + }, + { + "id": "regex 1.10.2", + "target": "regex" + }, + { + "id": "reqwest 0.11.23", + "target": "reqwest" + }, + { + "id": "serde 1.0.194", + "target": "serde" + }, + { + "id": "serde_json 1.0.111", + "target": "serde_json" + }, + { + "id": "sha2 0.10.8", + "target": "sha2" + }, + { + "id": "socket2 0.5.5", + "target": "socket2" + }, + { + "id": "spinners 4.1.1", + "target": "spinners" + }, + { + "id": "strum 0.25.0", + "target": "strum" + }, + { + "id": "tabled 0.14.0", + "target": "tabled" + }, + { + "id": "tabular 0.2.0", + "target": "tabular" + }, + { + "id": "tokio 1.35.1", + "target": "tokio" + }, + { + "id": "url 2.5.0", + "target": "url" + } + ], + "selects": {} + }, + "deps_dev": { + "common": [ + { + "id": "tempfile 3.9.0", + "target": "tempfile" + }, + { + "id": "wiremock 0.5.22", + "target": "wiremock" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "async-trait 0.1.77", + "target": "async_trait" + }, + { + "id": "strum_macros 0.25.3", + "target": "strum_macros" + } + ], + "selects": {} + }, + "version": "0.1.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": null + }, "dyn-clone 1.0.16": { "name": "dyn-clone", "version": "1.0.16", @@ -36676,235 +36905,6 @@ }, "license": null }, - "release_cli 0.1.0": { - "name": "release_cli", - "version": "0.1.0", - "repository": null, - "targets": [ - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": null, - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "actix-web 4.4.1", - "target": "actix_web" - }, - { - "id": "anyhow 1.0.79", - "target": "anyhow" - }, - { - "id": "candid 0.9.11", - "target": "candid" - }, - { - "id": "chrono 0.4.31", - "target": "chrono" - }, - { - "id": "clap 4.4.13", - "target": "clap" - }, - { - "id": "clap-num 1.0.2", - "target": "clap_num" - }, - { - "id": "colored 2.1.0", - "target": "colored" - }, - { - "id": "cryptoki 0.3.1", - "target": "cryptoki" - }, - { - "id": "dialoguer 0.10.4", - "target": "dialoguer" - }, - { - "id": "dirs 5.0.1", - "target": "dirs" - }, - { - "id": "dotenv 0.15.0", - "target": "dotenv" - }, - { - "id": "edit 0.1.5", - "target": "edit" - }, - { - "id": "flate2 1.0.28", - "target": "flate2" - }, - { - "id": "futures 0.3.30", - "target": "futures" - }, - { - "id": "ic-agent 0.27.0", - "target": "ic_agent" - }, - { - "id": "ic-base-types 0.9.0", - "target": "ic_base_types" - }, - { - "id": "ic-canister-client 0.9.0", - "target": "ic_canister_client" - }, - { - "id": "ic-nns-constants 0.9.0", - "target": "ic_nns_constants" - }, - { - "id": "ic-nns-governance 0.9.0", - "target": "ic_nns_governance" - }, - { - "id": "ic-protobuf 0.9.0", - "target": "ic_protobuf" - }, - { - "id": "ic-registry-keys 0.9.0", - "target": "ic_registry_keys" - }, - { - "id": "ic-registry-nns-data-provider 0.9.0", - "target": "ic_registry_nns_data_provider" - }, - { - "id": "ic-registry-transport 0.9.0", - "target": "ic_registry_transport" - }, - { - "id": "ic-sys 0.9.0", - "target": "ic_sys" - }, - { - "id": "itertools 0.11.0", - "target": "itertools" - }, - { - "id": "keyring 2.3.1", - "target": "keyring" - }, - { - "id": "log 0.4.20", - "target": "log" - }, - { - "id": "pretty_env_logger 0.5.0", - "target": "pretty_env_logger" - }, - { - "id": "prost 0.12.3", - "target": "prost" - }, - { - "id": "regex 1.10.2", - "target": "regex" - }, - { - "id": "release_cli 0.1.0", - "target": "build_script_build" - }, - { - "id": "reqwest 0.11.23", - "target": "reqwest" - }, - { - "id": "serde 1.0.194", - "target": "serde" - }, - { - "id": "serde_json 1.0.111", - "target": "serde_json" - }, - { - "id": "sha2 0.10.8", - "target": "sha2" - }, - { - "id": "socket2 0.5.5", - "target": "socket2" - }, - { - "id": "spinners 4.1.1", - "target": "spinners" - }, - { - "id": "strum 0.25.0", - "target": "strum" - }, - { - "id": "tabled 0.14.0", - "target": "tabled" - }, - { - "id": "tabular 0.2.0", - "target": "tabular" - }, - { - "id": "tokio 1.35.1", - "target": "tokio" - }, - { - "id": "url 2.5.0", - "target": "url" - } - ], - "selects": {} - }, - "deps_dev": { - "common": [ - { - "id": "tempfile 3.9.0", - "target": "tempfile" - }, - { - "id": "wiremock 0.5.22", - "target": "wiremock" - } - ], - "selects": {} - }, - "edition": "2021", - "proc_macro_deps": { - "common": [ - { - "id": "async-trait 0.1.77", - "target": "async_trait" - }, - { - "id": "strum_macros 0.25.3", - "target": "strum_macros" - } - ], - "selects": {} - }, - "version": "0.1.0" - }, - "build_script_attrs": { - "data_glob": [ - "**" - ] - }, - "license": null - }, "rend 0.4.1": { "name": "rend", "version": "0.4.1", @@ -50150,6 +50150,7 @@ "canister-log-fetcher 0.1.0": "rs/canister-log-fetcher", "config-writer-common 0.1.0": "rs/ic-observability/config-writer-common", "decentralization 0.1.0": "rs/decentralization", + "dre 0.1.0": "rs/cli", "ic-canisters 0.1.0": "rs/ic-canisters", "ic-management-backend 0.1.0": "rs/ic-management-backend", "ic-management-types 0.1.0": "rs/ic-management-types", @@ -50161,7 +50162,6 @@ "np-notifications 0.1.0": "rs/np-notifications", "obs-canister-clients 0.1.0": "rs/ic-observability/obs-canister-clients", "prometheus-config-updater 0.1.0": "rs/ic-observability/prometheus-config-updater", - "release_cli 0.1.0": "rs/cli", "service-discovery 0.1.0": "rs/ic-observability/service-discovery", "slack-notifications 0.1.0": "rs/slack-notifications", "sns-downloader 0.1.0": "rs/ic-observability/sns-downloader" diff --git a/Cargo.lock b/Cargo.lock index e4d47d8c9..3da9cc24b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2273,6 +2273,61 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "dre" +version = "0.1.0" +dependencies = [ + "actix-web", + "anyhow", + "async-trait", + "candid", + "chrono", + "clap 4.4.13", + "clap-num", + "colored", + "cryptoki", + "decentralization", + "dialoguer", + "dirs", + "dotenv", + "edit", + "flate2", + "futures", + "ic-agent 0.27.0", + "ic-base-types", + "ic-canister-client", + "ic-canisters", + "ic-management-backend", + "ic-management-types", + "ic-nns-constants", + "ic-nns-governance", + "ic-protobuf", + "ic-registry-keys", + "ic-registry-nns-data-provider", + "ic-registry-transport", + "ic-sys", + "itertools 0.11.0", + "keyring", + "log", + "pretty_env_logger", + "prost", + "regex", + "reqwest", + "serde", + "serde_json", + "sha2 0.10.8", + "socket2 0.5.5", + "spinners", + "strum 0.25.0", + "strum_macros 0.25.3", + "tabled", + "tabular", + "tempfile", + "tokio", + "url", + "wiremock", +] + [[package]] name = "dyn-clone" version = "1.0.16" @@ -7273,61 +7328,6 @@ dependencies = [ "url", ] -[[package]] -name = "release_cli" -version = "0.1.0" -dependencies = [ - "actix-web", - "anyhow", - "async-trait", - "candid", - "chrono", - "clap 4.4.13", - "clap-num", - "colored", - "cryptoki", - "decentralization", - "dialoguer", - "dirs", - "dotenv", - "edit", - "flate2", - "futures", - "ic-agent 0.27.0", - "ic-base-types", - "ic-canister-client", - "ic-canisters", - "ic-management-backend", - "ic-management-types", - "ic-nns-constants", - "ic-nns-governance", - "ic-protobuf", - "ic-registry-keys", - "ic-registry-nns-data-provider", - "ic-registry-transport", - "ic-sys", - "itertools 0.11.0", - "keyring", - "log", - "pretty_env_logger", - "prost", - "regex", - "reqwest", - "serde", - "serde_json", - "sha2 0.10.8", - "socket2 0.5.5", - "spinners", - "strum 0.25.0", - "strum_macros 0.25.3", - "tabled", - "tabular", - "tempfile", - "tokio", - "url", - "wiremock", -] - [[package]] name = "rend" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index 26f287eef..aee004863 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,13 @@ members = [ resolver = "2" +[workspace.package] +version = "0.1.0" +edition = "2021" +authors = ["IC Decentralized Reliability Engineering (DRE) Team"] +description = "Tooling for managing the Internet Computer" +documentation = "https://github.com/dfinity/dre/" + [profile.release] # Add debug information to the release build (does NOT reduce the level of optimization!) # Makes flamegraphs and backtraces more readable. diff --git a/rs/cli/Cargo.toml b/rs/cli/Cargo.toml index cdeabca9e..9ee963728 100644 --- a/rs/cli/Cargo.toml +++ b/rs/cli/Cargo.toml @@ -1,8 +1,11 @@ [package] -name = "release_cli" -version = "0.1.0" -edition = "2021" +name = "dre" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -60,7 +63,10 @@ sha2 = "0.10.6" edit = "0.1.4" tabular = "0.2" ic-agent = "0.27.0" -actix-web = { version = "4.2.1", default-features = false, features = ["compress-gzip", "macros"] } +actix-web = { version = "4.2.1", default-features = false, features = [ + "compress-gzip", + "macros", +] } dotenv = "0.15.0" socket2 = "0.5.4" spinners = "4.1.0" diff --git a/rs/decentralization/Cargo.toml b/rs/decentralization/Cargo.toml index f9dfb5441..bb6988ee3 100644 --- a/rs/decentralization/Cargo.toml +++ b/rs/decentralization/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "decentralization" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rs/ic-canisters/Cargo.toml b/rs/ic-canisters/Cargo.toml index 448f8cd55..8448b1346 100644 --- a/rs/ic-canisters/Cargo.toml +++ b/rs/ic-canisters/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "ic-canisters" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true [dependencies] ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "4b3b2ce76c4bde0c1c60fb80b0915931003b7eca" } diff --git a/rs/ic-management-backend/Cargo.toml b/rs/ic-management-backend/Cargo.toml index a1aa4da8b..a37b29494 100644 --- a/rs/ic-management-backend/Cargo.toml +++ b/rs/ic-management-backend/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "ic-management-backend" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true [dependencies] tokio = { version = "1.2.0", features = ["full"] } diff --git a/rs/ic-management-types/Cargo.toml b/rs/ic-management-types/Cargo.toml index f6d709cca..3ff5b8225 100644 --- a/rs/ic-management-types/Cargo.toml +++ b/rs/ic-management-types/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "ic-management-types" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true [dependencies] actix-web = { version = "4.2.1", default-features = false, features = [ diff --git a/rs/log-fetcher/Cargo.toml b/rs/log-fetcher/Cargo.toml index fade83529..3e5f26749 100644 --- a/rs/log-fetcher/Cargo.toml +++ b/rs/log-fetcher/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "log-fetcher" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -25,4 +28,4 @@ pretty_env_logger = "0.5.0" tokio = { version = "1.14.0", features = ["full"] } anyhow = "1.0.44" serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.108" \ No newline at end of file +serde_json = "1.0.108" diff --git a/rs/np-notifications/Cargo.toml b/rs/np-notifications/Cargo.toml index 246f00a11..874c280d6 100644 --- a/rs/np-notifications/Cargo.toml +++ b/rs/np-notifications/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "np-notifications" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,7 +29,7 @@ serde_yaml = "0.9.25" rand = "0.8.5" tracing = { version = "0.1.37", features = ["log"] } tracing-subscriber = "0.3.17" -tracing-log = { version= "0.2.0", features = ["log-tracer"] } +tracing-log = { version = "0.2.0", features = ["log-tracer"] } anyhow = "1.0.75" [dev-dependencies] @@ -34,8 +37,13 @@ tempfile = "3.8.0" pretty_assertions = "1.4.0" httptest = "0.15.4" # Default features disabled because it would require env_logger, and we are not using it -test-log = { version = "0.2.12", default-features = false, features = ["trace"] } +test-log = { version = "0.2.12", default-features = false, features = [ + "trace", +] } # Necessary for test-log # https://crates.io/crates/test-log -tracing = {version = "0.1", default-features = false} -tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]} +tracing = { version = "0.1", default-features = false } +tracing-subscriber = { version = "0.3", default-features = false, features = [ + "env-filter", + "fmt", +] } diff --git a/rs/slack-notifications/Cargo.toml b/rs/slack-notifications/Cargo.toml index 39ac4fd33..ab4a78056 100644 --- a/rs/slack-notifications/Cargo.toml +++ b/rs/slack-notifications/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "slack-notifications" -version = "0.1.0" -edition = "2021" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +documentation.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html