From 6e6bb2f7d15803b13d812b85561b4c28b56c5ee0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Dec 2024 10:01:08 +0000 Subject: [PATCH 1/4] build(deps): remove unused dependencies --- Cargo.lock | 64 -------------------------------- Cargo.toml | 2 - crates/pop-cli/Cargo.toml | 1 - crates/pop-contracts/Cargo.toml | 7 ---- crates/pop-parachains/Cargo.toml | 6 --- 5 files changed, 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac67e52da..cd5dfe25f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -870,28 +870,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "async-task" version = "4.7.1" @@ -3551,15 +3529,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - [[package]] name = "fnv" version = "1.0.7" @@ -6062,12 +6031,6 @@ dependencies = [ "nom", ] -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -9369,7 +9332,6 @@ dependencies = [ "pop-contracts", "pop-parachains", "pop-telemetry", - "predicates", "reqwest 0.12.9", "serde", "serde_json", @@ -9425,12 +9387,9 @@ dependencies = [ "contract-build", "contract-extrinsics", "contract-transcode", - "dirs", "duct", - "flate2", "heck 0.5.0", "ink_env", - "mockito", "pop-common", "reqwest 0.12.9", "scale-info", @@ -9440,11 +9399,9 @@ dependencies = [ "strum_macros 0.26.4", "subxt", "subxt-signer", - "tar", "tempfile", "thiserror 1.0.69", "tokio", - "tokio-test", "url", ] @@ -9456,12 +9413,9 @@ dependencies = [ "askama", "clap", "duct", - "flate2", "glob", "indexmap 2.7.0", - "mockito", "pop-common", - "reqwest 0.12.9", "scale-info", "scale-value", "serde_json", @@ -9471,11 +9425,9 @@ dependencies = [ "subxt", "subxt-signer", "symlink", - "tar", "tempfile", "thiserror 1.0.69", "tokio", - "tokio-test", "toml_edit 0.22.22", "url", "walkdir", @@ -9527,10 +9479,7 @@ checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", - "float-cmp", - "normalize-line-endings", "predicates-core", - "regex", ] [[package]] @@ -13731,19 +13680,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-test" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" -dependencies = [ - "async-stream", - "bytes", - "futures-core", - "tokio", - "tokio-stream", -] - [[package]] name = "tokio-tungstenite" version = "0.20.1" diff --git a/Cargo.toml b/Cargo.toml index 44dd1fbd3..e83e118e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,11 +32,9 @@ git2 = { version = "0.18", features = ["vendored-openssl"] } glob = "0.3.1" log = "0.4.20" mockito = "1.4.0" -predicates = "3.1.0" tar = "0.4.40" tempfile = "3.10" thiserror = "1.0.58" -tokio-test = "0.4.4" toml = "0.5.0" # networking diff --git a/crates/pop-cli/Cargo.toml b/crates/pop-cli/Cargo.toml index 34e51111d..6093569dc 100644 --- a/crates/pop-cli/Cargo.toml +++ b/crates/pop-cli/Cargo.toml @@ -55,7 +55,6 @@ tower-http = { workspace = true, features = ["fs", "cors"] } [dev-dependencies] assert_cmd.workspace = true contract-extrinsics.workspace = true -predicates.workspace = true subxt.workspace = true subxt-signer.workspace = true sp-weights.workspace = true diff --git a/crates/pop-contracts/Cargo.toml b/crates/pop-contracts/Cargo.toml index f44332299..1421928ce 100644 --- a/crates/pop-contracts/Cargo.toml +++ b/crates/pop-contracts/Cargo.toml @@ -13,9 +13,7 @@ version.workspace = true [dependencies] anyhow.workspace = true duct.workspace = true -flate2.workspace = true reqwest.workspace = true -tar.workspace = true tempfile.workspace = true thiserror.workspace = true tokio.workspace = true @@ -37,8 +35,3 @@ contract-transcode.workspace = true scale-info.workspace = true # pop pop-common = { path = "../pop-common", version = "0.5.0" } - -[dev-dependencies] -dirs.workspace = true -mockito.workspace = true -tokio-test.workspace = true \ No newline at end of file diff --git a/crates/pop-parachains/Cargo.toml b/crates/pop-parachains/Cargo.toml index 89c1df6d9..405d32579 100644 --- a/crates/pop-parachains/Cargo.toml +++ b/crates/pop-parachains/Cargo.toml @@ -12,14 +12,12 @@ version.workspace = true anyhow.workspace = true clap.workspace = true duct.workspace = true -flate2.workspace = true glob.workspace = true serde_json.workspace = true strum.workspace = true strum_macros.workspace = true subxt-signer.workspace = true subxt.workspace = true -tar.workspace = true tempfile.workspace = true thiserror.workspace = true tokio.workspace = true @@ -27,7 +25,6 @@ url.workspace = true askama.workspace = true indexmap.workspace = true -reqwest.workspace = true scale-info.workspace = true scale-value.workspace = true sp-core.workspace = true @@ -40,6 +37,3 @@ zombienet-sdk.workspace = true # Pop pop-common = { path = "../pop-common", version = "0.5.0" } -[dev-dependencies] -mockito.workspace = true -tokio-test.workspace = true From 9870b9eef7ce23371a97b512101f7587c5c377aa Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Dec 2024 10:01:44 +0000 Subject: [PATCH 2/4] refactor: remove unused import --- crates/pop-parachains/src/utils/helpers.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/pop-parachains/src/utils/helpers.rs b/crates/pop-parachains/src/utils/helpers.rs index fd8e91d68..f38d7bce5 100644 --- a/crates/pop-parachains/src/utils/helpers.rs +++ b/crates/pop-parachains/src/utils/helpers.rs @@ -88,7 +88,6 @@ mod tests { use super::*; use crate::generator::parachain::ChainSpec; use askama::Template; - use std::env::var; use tempfile::tempdir; #[test] From 7ceda9758d7e002b97ef0046fd858c7346378249 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Dec 2024 10:02:31 +0000 Subject: [PATCH 3/4] refactor: silence warning as function will be used in the future --- crates/pop-cli/src/cli.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/pop-cli/src/cli.rs b/crates/pop-cli/src/cli.rs index f98c934e9..9d2b86ec7 100644 --- a/crates/pop-cli/src/cli.rs +++ b/crates/pop-cli/src/cli.rs @@ -304,6 +304,7 @@ pub(crate) mod tests { self } + #[allow(dead_code)] pub(crate) fn expect_success(mut self, message: impl Display) -> Self { self.success_expectations.push(message.to_string()); self From c9aa9eee7d96496f1d6d9f0cd0d5965e027cabc7 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Dec 2024 10:21:20 +0000 Subject: [PATCH 4/4] revert: revert removal of tokio-test as used by doc tests --- Cargo.lock | 37 ++++++++++++++++++++++++++++++++ Cargo.toml | 1 + crates/pop-contracts/Cargo.toml | 6 +++++- crates/pop-parachains/Cargo.toml | 3 +++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index cd5dfe25f..48e49894a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -870,6 +870,28 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "async-task" version = "4.7.1" @@ -9402,6 +9424,7 @@ dependencies = [ "tempfile", "thiserror 1.0.69", "tokio", + "tokio-test", "url", ] @@ -9428,6 +9451,7 @@ dependencies = [ "tempfile", "thiserror 1.0.69", "tokio", + "tokio-test", "toml_edit 0.22.22", "url", "walkdir", @@ -13680,6 +13704,19 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + [[package]] name = "tokio-tungstenite" version = "0.20.1" diff --git a/Cargo.toml b/Cargo.toml index e83e118e6..8b284b10a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ mockito = "1.4.0" tar = "0.4.40" tempfile = "3.10" thiserror = "1.0.58" +tokio-test = "0.4.4" toml = "0.5.0" # networking diff --git a/crates/pop-contracts/Cargo.toml b/crates/pop-contracts/Cargo.toml index 1421928ce..cd880213c 100644 --- a/crates/pop-contracts/Cargo.toml +++ b/crates/pop-contracts/Cargo.toml @@ -33,5 +33,9 @@ contract-build.workspace = true contract-extrinsics.workspace = true contract-transcode.workspace = true scale-info.workspace = true -# pop +# pop pop-common = { path = "../pop-common", version = "0.5.0" } + +[dev-dependencies] +# Used in doc tests. +tokio-test.workspace = true \ No newline at end of file diff --git a/crates/pop-parachains/Cargo.toml b/crates/pop-parachains/Cargo.toml index 405d32579..4b2ee4111 100644 --- a/crates/pop-parachains/Cargo.toml +++ b/crates/pop-parachains/Cargo.toml @@ -37,3 +37,6 @@ zombienet-sdk.workspace = true # Pop pop-common = { path = "../pop-common", version = "0.5.0" } +[dev-dependencies] +# Used in doc tests. +tokio-test.workspace = true