From d852e7582f1ccdd3bee9d6f930a9b5a0f61c3939 Mon Sep 17 00:00:00 2001 From: dorimedini-starkware Date: Thu, 11 Jul 2024 16:54:50 +0300 Subject: [PATCH] chore: fix machete errors (#16) Signed-off-by: Dori Medini --- Cargo.lock | 20 -------------------- crates/committer/Cargo.toml | 1 - crates/committer_cli/Cargo.toml | 3 --- crates/papyrus_common/Cargo.toml | 2 -- crates/papyrus_execution/Cargo.toml | 7 ++++++- crates/papyrus_monitoring_gateway/Cargo.toml | 1 - crates/papyrus_network/Cargo.toml | 1 - crates/papyrus_node/Cargo.toml | 5 ----- crates/papyrus_p2p_sync/Cargo.toml | 7 ++++++- crates/papyrus_protobuf/Cargo.toml | 10 +++++++--- crates/papyrus_rpc/Cargo.toml | 4 ---- crates/papyrus_sync/Cargo.toml | 4 ---- crates/papyrus_test_utils/Cargo.toml | 1 - crates/starknet_client/Cargo.toml | 11 ++++++++--- 14 files changed, 27 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53c9ef7d87..e19679b4eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6091,7 +6091,6 @@ name = "papyrus_common" version = "0.4.0-dev.4" dependencies = [ "assert_matches", - "bitvec", "cairo-lang-starknet-classes", "hex", "indexmap 2.2.6", @@ -6103,7 +6102,6 @@ dependencies = [ "serde", "serde_json", "sha3", - "starknet-crypto 0.5.2", "starknet-types-core", "starknet_api", "thiserror", @@ -6197,7 +6195,6 @@ name = "papyrus_monitoring_gateway" version = "0.4.0-dev.4" dependencies = [ "axum", - "futures-util", "http-body", "hyper", "metrics 0.21.1", @@ -6241,7 +6238,6 @@ dependencies = [ "pretty_assertions", "replace_with", "serde", - "starknet_api", "thiserror", "tokio", "tokio-stream", @@ -6257,7 +6253,6 @@ version = "0.4.0-dev.4" dependencies = [ "anyhow", "assert-json-diff", - "async-stream", "clap 4.5.4", "colored", "const_format", @@ -6265,9 +6260,7 @@ dependencies = [ "futures-util", "insta", "itertools 0.10.5", - "jsonrpsee", "lazy_static", - "libmdbx", "metrics-exporter-prometheus", "once_cell", "papyrus_base_layer", @@ -6290,12 +6283,10 @@ dependencies = [ "starknet_client", "strum 0.25.0", "tempfile", - "thiserror", "tokio", "tokio-stream", "tracing", "tracing-subscriber", - "url", "validator", ] @@ -6345,7 +6336,6 @@ dependencies = [ name = "papyrus_protobuf" version = "0.4.0-dev.4" dependencies = [ - "bytes", "indexmap 2.2.6", "lazy_static", "papyrus_common", @@ -6353,7 +6343,6 @@ dependencies = [ "primitive-types", "prost", "prost-build", - "prost-types", "rand 0.8.5", "rand_chacha 0.3.1", "starknet-types-core", @@ -6376,7 +6365,6 @@ dependencies = [ "enum-iterator", "ethers", "flate2", - "futures", "futures-util", "hex", "hyper", @@ -6409,12 +6397,9 @@ dependencies = [ "starknet_client", "strum 0.25.0", "strum_macros 0.25.3", - "thiserror", "tokio", - "tokio-stream", "tower", "tracing", - "url", "validator", ] @@ -6479,12 +6464,9 @@ dependencies = [ "cairo-lang-starknet-classes", "chrono", "futures", - "futures-channel", "futures-util", - "hex", "indexmap 2.2.6", "itertools 0.10.5", - "libmdbx", "lru", "metrics 0.21.1", "mockall", @@ -6505,7 +6487,6 @@ dependencies = [ "tokio", "tokio-stream", "tracing", - "url", ] [[package]] @@ -6527,7 +6508,6 @@ dependencies = [ "serde_json", "starknet-types-core", "starknet_api", - "tracing", ] [[package]] diff --git a/crates/committer/Cargo.toml b/crates/committer/Cargo.toml index be55749ae5..6a31c49470 100644 --- a/crates/committer/Cargo.toml +++ b/crates/committer/Cargo.toml @@ -28,7 +28,6 @@ rand.workspace = true serde.workspace = true serde_json.workspace = true starknet-types-core.workspace = true -strum.workspace = true strum_macros.workspace = true thiserror.workspace = true tokio.workspace = true diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 90e4a109d7..eaff2f7aea 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -16,9 +16,7 @@ pretty_assertions.workspace = true [dependencies] clap.workspace = true committer = { path = "../committer", features = ["testing"] } -derive_more.workspace = true ethnum.workspace = true -hex.workspace = true indexmap.workspace = true rand.workspace = true rand_distr.workspace = true @@ -28,7 +26,6 @@ simplelog.workspace = true starknet-types-core.workspace = true starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9"} strum.workspace = true -strum_macros.workspace = true thiserror.workspace = true tokio.workspace = true diff --git a/crates/papyrus_common/Cargo.toml b/crates/papyrus_common/Cargo.toml index 1d00ad0722..27943498e4 100644 --- a/crates/papyrus_common/Cargo.toml +++ b/crates/papyrus_common/Cargo.toml @@ -7,7 +7,6 @@ license-file.workspace = true description = "Common utils and objects for a Starknet node." [dependencies] -bitvec.workspace = true cairo-lang-starknet-classes.workspace = true hex.workspace = true itertools.workspace = true @@ -16,7 +15,6 @@ serde.workspace = true serde_json.workspace = true sha3.workspace = true starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9" } -starknet-crypto.workspace = true starknet-types-core = { workspace = true, features = ["hash"] } thiserror.workspace = true rand.workspace = true diff --git a/crates/papyrus_execution/Cargo.toml b/crates/papyrus_execution/Cargo.toml index 630ac1e317..d29e2334c4 100644 --- a/crates/papyrus_execution/Cargo.toml +++ b/crates/papyrus_execution/Cargo.toml @@ -7,7 +7,7 @@ license-file.workspace = true description = "Transaction and entry point execution functionality for a Papyrus node." [features] -testing = ["rand", "rand_chacha", "papyrus_test_utils"] +testing = ["papyrus_test_utils", "rand", "rand_chacha"] [dependencies] anyhow.workspace = true @@ -41,3 +41,8 @@ pretty_assertions.workspace = true rand.workspace = true rand_chacha.workspace = true papyrus_test_utils = { path = "../papyrus_test_utils" } + +# Optional dependency required for testing. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["rand"] diff --git a/crates/papyrus_monitoring_gateway/Cargo.toml b/crates/papyrus_monitoring_gateway/Cargo.toml index 7b8b127a27..f7da07999a 100644 --- a/crates/papyrus_monitoring_gateway/Cargo.toml +++ b/crates/papyrus_monitoring_gateway/Cargo.toml @@ -7,7 +7,6 @@ license-file.workspace = true [dependencies] axum.workspace = true -futures-util.workspace = true hyper = { workspace = true, features = ["full"] } metrics-exporter-prometheus = { version = "0.12.1" } metrics-process = { version = "1.0.11" } diff --git a/crates/papyrus_network/Cargo.toml b/crates/papyrus_network/Cargo.toml index 01776ffe5f..613c1f120a 100644 --- a/crates/papyrus_network/Cargo.toml +++ b/crates/papyrus_network/Cargo.toml @@ -39,7 +39,6 @@ replace_with.workspace = true papyrus_common = { path = "../papyrus_common", version = "0.4.0-dev.4" } papyrus_config = { path = "../papyrus_config", version = "0.4.0-dev.4" } serde = { workspace = true, features = ["derive"] } -starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9" } thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } tracing.workspace = true diff --git a/crates/papyrus_node/Cargo.toml b/crates/papyrus_node/Cargo.toml index 2950516e36..a6fe8b7a22 100644 --- a/crates/papyrus_node/Cargo.toml +++ b/crates/papyrus_node/Cargo.toml @@ -19,13 +19,10 @@ path = "src/bin/central_source_integration_test.rs" [dependencies] anyhow.workspace = true -async-stream.workspace = true clap = { workspace = true } const_format.workspace = true futures.workspace = true itertools.workspace = true -jsonrpsee = { workspace = true, features = ["full"] } -libmdbx = { workspace = true, features = ["lifetimed-bytes"] } lazy_static.workspace = true once_cell.workspace = true papyrus_base_layer = { path = "../papyrus_base_layer", version = "0.4.0-dev.4" } @@ -45,11 +42,9 @@ serde_json = { workspace = true, features = ["arbitrary_precision"] } starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9", features = ["testing"] } starknet_client = { path = "../starknet_client" } strum.workspace = true -thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } tracing-subscriber = { workspace = true, features = ["env-filter"] } tracing.workspace = true -url.workspace = true validator = { workspace = true, features = ["derive"] } # Binaries dependencies diff --git a/crates/papyrus_p2p_sync/Cargo.toml b/crates/papyrus_p2p_sync/Cargo.toml index 468605ec7e..d124c9c150 100644 --- a/crates/papyrus_p2p_sync/Cargo.toml +++ b/crates/papyrus_p2p_sync/Cargo.toml @@ -32,4 +32,9 @@ static_assertions.workspace = true rand.workspace = true rand_chacha.workspace = true papyrus_test_utils = { path = "../papyrus_test_utils" } -papyrus_protobuf = { path = "../papyrus_protobuf", features = ["testing"]} +papyrus_protobuf = { path = "../papyrus_protobuf", features = ["testing"] } + +# Optional dependency required for testing. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["metrics"] diff --git a/crates/papyrus_protobuf/Cargo.toml b/crates/papyrus_protobuf/Cargo.toml index e3aedfc46f..94679c3bc0 100644 --- a/crates/papyrus_protobuf/Cargo.toml +++ b/crates/papyrus_protobuf/Cargo.toml @@ -6,15 +6,13 @@ repository.workspace = true license-file.workspace = true [features] -testing = ["rand", "rand_chacha", "papyrus_test_utils"] +testing = ["papyrus_test_utils", "rand", "rand_chacha"] [dependencies] -bytes.workspace = true indexmap.workspace = true lazy_static.workspace = true primitive-types.workspace = true prost.workspace = true -prost-types.workspace = true rand = { workspace = true, optional = true } rand_chacha = { workspace = true, optional = true } starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9" } @@ -30,3 +28,9 @@ papyrus_test_utils = { path = "../papyrus_test_utils" } [build-dependencies] prost-build.workspace = true + + +# Optional dependencies required for testing. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["rand", "rand_chacha"] diff --git a/crates/papyrus_rpc/Cargo.toml b/crates/papyrus_rpc/Cargo.toml index 9d165ade13..ad4506097e 100644 --- a/crates/papyrus_rpc/Cargo.toml +++ b/crates/papyrus_rpc/Cargo.toml @@ -12,7 +12,6 @@ base64.workspace = true cairo-lang-starknet-classes.workspace = true ethers.workspace = true flate2.workspace = true -futures.workspace = true futures-util.workspace = true hex.workspace = true hyper = { workspace = true, features = ["full"] } @@ -30,12 +29,9 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9" } starknet-types-core.workspace = true -thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } -tokio-stream.workspace = true tower = { workspace = true, features = ["full"] } tracing.workspace = true -url.workspace = true validator = { workspace = true, features = ["derive"] } [dev-dependencies] diff --git a/crates/papyrus_sync/Cargo.toml b/crates/papyrus_sync/Cargo.toml index e44c9a6e59..40a52785a1 100644 --- a/crates/papyrus_sync/Cargo.toml +++ b/crates/papyrus_sync/Cargo.toml @@ -10,13 +10,10 @@ async-stream.workspace = true async-trait.workspace = true cairo-lang-starknet-classes.workspace = true chrono.workspace = true -futures-channel.workspace = true futures-util.workspace = true futures.workspace = true -hex.workspace = true indexmap = { workspace = true, features = ["serde"] } itertools.workspace = true -libmdbx = { workspace = true, features = ["lifetimed-bytes"] } lru.workspace = true metrics.workspace = true papyrus_storage = { path = "../papyrus_storage", version = "0.4.0-dev.4" } @@ -32,7 +29,6 @@ starknet-types-core.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } tracing.workspace = true -url.workspace = true [dev-dependencies] simple_logger.workspace = true diff --git a/crates/papyrus_test_utils/Cargo.toml b/crates/papyrus_test_utils/Cargo.toml index f1ae192ed0..646e59a120 100644 --- a/crates/papyrus_test_utils/Cargo.toml +++ b/crates/papyrus_test_utils/Cargo.toml @@ -22,7 +22,6 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"]} starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9", features = ["testing"] } starknet-types-core = { workspace = true, features = ["hash"] } -tracing = { workspace = true, features = ["log"] } [dev-dependencies] pretty_assertions.workspace = true diff --git a/crates/starknet_client/Cargo.toml b/crates/starknet_client/Cargo.toml index dcf147f5f6..826934a52e 100644 --- a/crates/starknet_client/Cargo.toml +++ b/crates/starknet_client/Cargo.toml @@ -7,7 +7,7 @@ license-file.workspace = true description = "A client implementation that can communicate with Starknet." [features] -testing = ["enum-iterator", "mockall", "rand", "rand_chacha", "papyrus_test_utils"] +testing = ["enum-iterator", "mockall", "papyrus_test_utils", "rand", "rand_chacha"] [dependencies] async-trait.workspace = true @@ -21,12 +21,12 @@ papyrus_common = { path = "../papyrus_common", version = "0.4.0-dev.4" } papyrus_config = { path = "../papyrus_config", version = "0.4.0-dev.4" } rand = { workspace = true, optional = true } rand_chacha = { workspace = true, optional = true } -reqwest = { workspace = true, features = ["json", "blocking"] } +reqwest = { workspace = true, features = ["blocking", "json"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } serde_repr.workspace = true starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9" } -starknet-types-core = {workspace = true, features = ["serde"]} +starknet-types-core = { workspace = true, features = ["serde"] } strum.workspace = true strum_macros.workspace = true papyrus_test_utils = { path = "../papyrus_test_utils", optional = true } @@ -47,3 +47,8 @@ pretty_assertions.workspace = true simple_logger.workspace = true starknet_api = { path = "../starknet_api", version = "0.13.0-dev.9", features = ["testing"] } papyrus_test_utils = { path = "../papyrus_test_utils" } + +# Optional dependencies required for testing. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["rand", "rand_chacha", "strum"]