From 872b949a6ffe80adbd04444c4fe3604f2eb5f008 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Tue, 15 Nov 2022 22:15:50 +0800 Subject: [PATCH] Use workspace dependencies (#295) --- Cargo.toml | 26 +++++++++++++++ bin/subalfred/Cargo.toml | 18 +++++----- lib/core/Cargo.toml | 40 +++++++++++------------ lib/util/Cargo.toml | 2 +- substrate-minimal/subcryptor/Cargo.toml | 4 +-- substrate-minimal/subgrandpa/Cargo.toml | 4 +-- substrate-minimal/submetadatan/Cargo.toml | 2 +- substrate-minimal/subrpcer/Cargo.toml | 10 +++--- substrate-minimal/subruntimer/Cargo.toml | 2 +- substrate-minimal/subspector/Cargo.toml | 6 ++-- substrate-minimal/substorager/Cargo.toml | 6 ++-- substrate-minimal/subversioner/Cargo.toml | 2 +- 12 files changed, 74 insertions(+), 48 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c6e3b91f..4e89aee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,3 +5,29 @@ members = [ "lib/*", "substrate-minimal/*", ] + + [workspace.dependencies] + # crates.io + array-bytes = { version = "4.1" } + clap = { version = "4.0" } + fxhash = { version = "0.2" } + once_cell = { version = "1.15" } + parity-scale-codec = { version = "3.2" } + reqwest = { version = "0.11" } + serde = { version = "1.0" } + serde_json = { version = "1.0" } + thiserror = { version = "1.0" } + tokio = { version = "1.21" } + tracing = { version = "0.1" } + # hack-ink + cmd-impl = { version = "0.9.0-rc16", path = "bin/subalfred/src/command/impl" } + subalfred-core = { version = "0.9.0-rc16", path = "lib/core" } + subalfred-util = { version = "0.9.0-rc16", path = "lib/util" } + subcryptor = { version = "0.9.0-rc16", path = "substrate-minimal/subcryptor" } + subhasher = { version = "0.9.0-rc16", path = "substrate-minimal/subhasher" } + submetadatan = { version = "0.9.0-rc16", path = "substrate-minimal/submetadatan" } + subrpcer = { version = "0.9.0-rc16", path = "substrate-minimal/subrpcer" } + subruntimer = { version = "0.9.0-rc16", path = "substrate-minimal/subruntimer" } + subspector = { version = "0.9.0-rc16", path = "substrate-minimal/subspector" } + substorager = { version = "0.9.0-rc16", path = "substrate-minimal/substorager" } + subversioner = { version = "0.9.0-rc16", path = "substrate-minimal/subversioner" } diff --git a/bin/subalfred/Cargo.toml b/bin/subalfred/Cargo.toml index f516799e..eb7e2b29 100644 --- a/bin/subalfred/Cargo.toml +++ b/bin/subalfred/Cargo.toml @@ -19,16 +19,16 @@ vergen = { version = "7.4" } [dependencies] # crates.io anyhow = { version = "1.0" } -array-bytes = { version = "4.1" } -clap = { version = "4.0", features = ["cargo", "derive", "wrap_help"] } +array-bytes = { workspace = true } +clap = { workspace = true, features = ["cargo", "derive", "wrap_help"] } color-eyre = { version = "0.6" } -serde_json = { version = "1.0" } -tokio = { version = "1.21", features = ["macros", "rt-multi-thread"] } +serde_json = { workspace = true } +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } tracing-subscriber = { version = "0.3" } unescaper = { version = "0.1" } # hack-ink -cmd-impl = { version = "0.9.0-rc16", path = "src/command/impl" } -subalfred-core = { version = "0.9.0-rc16", path = "../../lib/core", features = ["clap"] } -subhasher = { version = "0.9.0-rc16", path = "../../substrate-minimal/subhasher" } -subrpcer = { version = "0.9.0-rc16", path = "../../substrate-minimal/subrpcer" } -substorager = { version = "0.9.0-rc16", path = "../../substrate-minimal/substorager" } +cmd-impl = { workspace = true } +subalfred-core = { workspace = true, features = ["clap"] } +subhasher = { workspace = true } +subrpcer = { workspace = true } +substorager = { workspace = true } diff --git a/lib/core/Cargo.toml b/lib/core/Cargo.toml index 7e089162..e684a249 100644 --- a/lib/core/Cargo.toml +++ b/lib/core/Cargo.toml @@ -11,31 +11,31 @@ version = "0.9.0-rc16" [dependencies] # crates.io -array-bytes = { version = "4.1" } +array-bytes = { workspace = true } async-trait = { version = "0.1" } cargo_metadata = { version = "0.15" } cargo_toml = { version = "0.13" } -clap = { version = "4.0", optional = true, features = ["derive", "wrap_help"] } +clap = { workspace = true, optional = true, features = ["derive", "wrap_help"] } futures = { version = "0.3" } -fxhash = { version = "0.2" } -once_cell = { version = "1.15" } -parity-scale-codec = { version = "3.2" } +fxhash = { workspace = true } +once_cell = { workspace = true } +parity-scale-codec = { workspace = true } regex = { version = "1.7" } -reqwest = { version = "0.11", features = ["json"] } -serde = { version = "1.0" } -serde_json = { version = "1.0" } -thiserror = { version = "1.0" } -tokio = { version = "1.21", features = ["fs", "macros", "rt-multi-thread"] } +reqwest = { workspace = true, features = ["json"] } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs", "macros", "rt-multi-thread"] } tokio-stream = { version = "0.1" } tokio-tungstenite = { version = "0.17", features = ["rustls-tls-native-roots"] } -tracing = { version = "0.1" } +tracing = { workspace = true } # hack-ink -subalfred-util = { version = "0.9.0-rc16", path = "../util" } -subcryptor = { version = "0.9.0-rc16", path = "../../substrate-minimal/subcryptor" } -subhasher = { version = "0.9.0-rc16", path = "../../substrate-minimal/subhasher" } -submetadatan = { version = "0.9.0-rc16", path = "../../substrate-minimal/submetadatan" } -subrpcer = { version = "0.9.0-rc16", path = "../../substrate-minimal/subrpcer" } -subruntimer = { version = "0.9.0-rc16", path = "../../substrate-minimal/subruntimer", features = ["serde"] } -subspector = { version = "0.9.0-rc16", path = "../../substrate-minimal/subspector" } -substorager = { version = "0.9.0-rc16", path = "../../substrate-minimal/substorager" } -subversioner = { version = "0.9.0-rc16", path = "../../substrate-minimal/subversioner", features = ["serde"] } +subalfred-util = { workspace = true } +subcryptor = { workspace = true } +subhasher = { workspace = true } +submetadatan = { workspace = true } +subrpcer = { workspace = true } +subruntimer = { workspace = true, features = ["serde"] } +subspector = { workspace = true } +substorager = { workspace = true } +subversioner = { workspace = true, features = ["serde"] } diff --git a/lib/util/Cargo.toml b/lib/util/Cargo.toml index b51cc70c..401e2995 100644 --- a/lib/util/Cargo.toml +++ b/lib/util/Cargo.toml @@ -10,5 +10,5 @@ repository = "https://github.com/hack-ink/subalfred" version = "0.9.0-rc16" [dev-dependencies] -tracing = { version = "0.1" } +tracing = { workspace = true } tracing-test = { version = "0.2" } diff --git a/substrate-minimal/subcryptor/Cargo.toml b/substrate-minimal/subcryptor/Cargo.toml index fd9270ef..b0f49386 100644 --- a/substrate-minimal/subcryptor/Cargo.toml +++ b/substrate-minimal/subcryptor/Cargo.toml @@ -13,9 +13,9 @@ version = "0.9.0-rc16" # crates.io base58 = { version = "0.2" } blake2-rfc = { version = "0.2" } -parity-scale-codec = { version = "3.2", optional = true, features = ["derive"] } +parity-scale-codec = { workspace = true, optional = true, features = ["derive"] } ss58-registry = { version = "1.34" } -thiserror = { version = "1.0" } +thiserror = { workspace = true } [features] codec = [ diff --git a/substrate-minimal/subgrandpa/Cargo.toml b/substrate-minimal/subgrandpa/Cargo.toml index 2348dab4..3b32713d 100644 --- a/substrate-minimal/subgrandpa/Cargo.toml +++ b/substrate-minimal/subgrandpa/Cargo.toml @@ -11,8 +11,8 @@ version = "0.9.0-rc16" [dependencies] # crates.io -parity-scale-codec = { version = "3.2", optional = true, features = ["derive"] } -serde = { version = "1.0", optional = true, features = ["derive"] } +parity-scale-codec = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = ["derive"] } [features] codec = [ diff --git a/substrate-minimal/submetadatan/Cargo.toml b/substrate-minimal/submetadatan/Cargo.toml index 1d8e63df..2185eb2b 100644 --- a/substrate-minimal/submetadatan/Cargo.toml +++ b/substrate-minimal/submetadatan/Cargo.toml @@ -13,4 +13,4 @@ version = "0.9.0-rc16" # crates.io frame-metadata = { version = "15.0" } scale-info = { version = "2.3" } -thiserror = { version = "1.0" } +thiserror = { workspace = true } diff --git a/substrate-minimal/subrpcer/Cargo.toml b/substrate-minimal/subrpcer/Cargo.toml index f7a33f8d..eab42d8b 100644 --- a/substrate-minimal/subrpcer/Cargo.toml +++ b/substrate-minimal/subrpcer/Cargo.toml @@ -13,11 +13,11 @@ version = "0.9.0-rc16" # crates.io # TODO: https://github.com/dtolnay/paste/issues/72 affix = { version = "0.1" } -once_cell = { version = "1.15", optional = true } -reqwest = { version = "0.11", optional = true, features = ["json"] } -serde = { version = "1.0" } -serde_json = { version = "1.0" } -tracing = { version = "0.1", optional = true } +once_cell = { workspace = true, optional = true } +reqwest = { workspace = true, optional = true, features = ["json"] } +serde = { workspace = true } +serde_json = { workspace = true } +tracing = { workspace = true, optional = true } ureq = { version = "2.5", optional = true, features = ["json"] } [features] diff --git a/substrate-minimal/subruntimer/Cargo.toml b/substrate-minimal/subruntimer/Cargo.toml index 7ae3a183..fb630d03 100644 --- a/substrate-minimal/subruntimer/Cargo.toml +++ b/substrate-minimal/subruntimer/Cargo.toml @@ -11,4 +11,4 @@ version = "0.9.0-rc16" [dependencies] # crates.io -serde = { version = "1.0", optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = ["derive"] } diff --git a/substrate-minimal/subspector/Cargo.toml b/substrate-minimal/subspector/Cargo.toml index 0325a434..2cd567ad 100644 --- a/substrate-minimal/subspector/Cargo.toml +++ b/substrate-minimal/subspector/Cargo.toml @@ -11,6 +11,6 @@ version = "0.9.0-rc16" [dependencies] # crates.io -fxhash = { version = "0.2" } -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0" } +fxhash = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } diff --git a/substrate-minimal/substorager/Cargo.toml b/substrate-minimal/substorager/Cargo.toml index a3a7c04c..63e4033e 100644 --- a/substrate-minimal/substorager/Cargo.toml +++ b/substrate-minimal/substorager/Cargo.toml @@ -11,10 +11,10 @@ version = "0.9.0-rc16" [dependencies] # crates.io -array-bytes = { version = "4.1" } -parity-scale-codec = { version = "3.2", optional = true, features = ["derive"] } +array-bytes = { workspace = true } +parity-scale-codec = { workspace = true, optional = true, features = ["derive"] } # hack-ink -subhasher = { version = "0.9.0-rc16", path = "../subhasher" } +subhasher = { workspace = true } [features] codec = [ diff --git a/substrate-minimal/subversioner/Cargo.toml b/substrate-minimal/subversioner/Cargo.toml index 45d76304..f7e0413c 100644 --- a/substrate-minimal/subversioner/Cargo.toml +++ b/substrate-minimal/subversioner/Cargo.toml @@ -11,4 +11,4 @@ version = "0.9.0-rc16" [dependencies] # crates.io -serde = { version = "1.0", optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = ["derive"] }