depend-o-pocalipse (#9450)

Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.  
Updated code related to deprecated warning on tracing-subscriber `scope()` 
( See https://github.com/tokio-rs/tracing/issues/1429 )
This commit is contained in:
Squirrel
2021-08-13 15:18:37 +01:00
committed by GitHub
parent 76504e56d7
commit 7e9b8d278e
129 changed files with 487 additions and 726 deletions
+2 -4
View File
@@ -29,7 +29,7 @@ log = { version = "0.4.14", default-features = false }
sp-test-primitives = { version = "2.0.0", path = "../test-primitives" }
[features]
default = [ "std" ]
default = ["std"]
std = [
"codec/std",
"sp-core/std",
@@ -48,6 +48,4 @@ std = [
# building a runtime for registering it on chain.
#
# This sets the max logging level to `off` for `log`.
disable-logging = [
"log/max_level_off",
]
disable-logging = ["log/max_level_off"]
-2
View File
@@ -17,7 +17,6 @@ substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils
sp-version = { version = "4.0.0-dev", path = "../../version" }
sp-tracing = { version = "4.0.0-dev", path = "../../tracing" }
sp-runtime = { version = "4.0.0-dev", path = "../../runtime" }
sp-blockchain = { version = "4.0.0-dev", path = "../../blockchain" }
sp-consensus = { version = "0.10.0-dev", path = "../../consensus/common" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
@@ -30,7 +29,6 @@ criterion = "0.3.0"
futures = "0.3.9"
log = "0.4.14"
sp-core = { version = "4.0.0-dev", path = "../../core" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
[[bench]]
name = "bench"
+3 -2
View File
@@ -15,7 +15,9 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
"derive",
] }
integer-sqrt = "0.1.2"
static_assertions = "1.1.0"
num-traits = { version = "0.2.8", default-features = false }
@@ -26,7 +28,6 @@ sp-debug-derive = { version = "3.0.0", default-features = false, path = "../debu
[dev-dependencies]
rand = "0.7.2"
criterion = "0.3"
serde_json = "1.0"
primitive-types = "0.10.0"
[features]
@@ -18,7 +18,6 @@ sp-arithmetic = { version = "4.0.0-dev", path = ".." }
honggfuzz = "0.5.49"
primitive-types = "0.10.0"
num-bigint = "0.2"
num-traits = "0.2"
[[bin]]
name = "biguint"
@@ -392,18 +392,20 @@ where
// Already rounded down
Rounding::Down => {},
// Round up if the fractional part of the result is non-zero.
Rounding::Up =>
Rounding::Up => {
if rem_mul_upper % denom_upper > 0.into() {
// `rem * numer / denom` is less than `numer`, so this will not overflow.
rem_mul_div_inner += 1.into();
},
}
},
// Round up if the fractional part of the result is greater than a half. An exact half is
// rounded down.
Rounding::Nearest =>
Rounding::Nearest => {
if rem_mul_upper % denom_upper > denom_upper / 2.into() {
// `rem * numer / denom` is less than `numer`, so this will not overflow.
rem_mul_div_inner += 1.into();
},
}
},
}
rem_mul_div_inner.into()
}
@@ -15,10 +15,12 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
async-trait = "0.1.42"
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
futures = { version = "0.3.1", features = ["thread-pool"] }
log = "0.4.8"
sp-core = { path = "../../core", version = "4.0.0-dev"}
sp-core = { path = "../../core", version = "4.0.0-dev" }
sp-inherents = { version = "4.0.0-dev", path = "../../inherents" }
sp-state-machine = { version = "0.10.0-dev", path = "../../state-machine" }
futures-timer = "3.0.1"
+21 -8
View File
@@ -14,11 +14,16 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
sp-std = { version = "4.0.0-dev", default-features = false, path = "../std" }
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = [
"derive",
"max-encoded-len",
] }
log = { version = "0.4.11", default-features = false }
serde = { version = "1.0.126", optional = true, features = ["derive"] }
byteorder = { version = "1.3.2", default-features = false }
primitive-types = { version = "0.10.0", default-features = false, features = ["codec"] }
primitive-types = { version = "0.10.0", default-features = false, features = [
"codec",
] }
impl-serde = { version = "0.3.0", optional = true }
wasmi = { version = "0.9.0", optional = true }
hash-db = { version = "0.15.2", default-features = false }
@@ -36,32 +41,40 @@ parking_lot = { version = "0.11.1", optional = true }
sp-debug-derive = { version = "3.0.0", path = "../debug-derive" }
sp-externalities = { version = "0.10.0-dev", optional = true, path = "../externalities" }
sp-storage = { version = "4.0.0-dev", default-features = false, path = "../storage" }
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.10.0", default-features = false, features = [
"primitive-types",
] }
futures = { version = "0.3.1", optional = true }
dyn-clonable = { version = "0.9.0", optional = true }
thiserror = { version = "1.0.21", optional = true }
# full crypto
ed25519-dalek = { version = "1.0.1", default-features = false, features = ["u64_backend", "alloc"], optional = true }
ed25519-dalek = { version = "1.0.1", default-features = false, features = [
"u64_backend",
"alloc",
], optional = true }
blake2-rfc = { version = "0.2.18", default-features = false, optional = true }
tiny-keccak = { version = "2.0.1", features = ["keccak"], optional = true }
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true }
schnorrkel = { version = "0.9.1", features = [
"preaudit_deprecated",
"u64_backend",
], default-features = false, optional = true }
sha2 = { version = "0.9.2", default-features = false, optional = true }
hex = { version = "0.4", default-features = false, optional = true }
twox-hash = { version = "1.5.0", default-features = false, optional = true }
libsecp256k1 = { version = "0.3.2", default-features = false, features = ["hmac"], optional = true }
libsecp256k1 = { version = "0.3.2", default-features = false, features = [
"hmac",
], optional = true }
merlin = { version = "2.0", default-features = false, optional = true }
sp-runtime-interface = { version = "4.0.0-dev", default-features = false, path = "../runtime-interface" }
[dev-dependencies]
sp-serializer = { version = "3.0.0", path = "../serializer" }
pretty_assertions = "0.6.1"
hex-literal = "0.3.1"
rand = "0.7.2"
criterion = "0.3.3"
serde_json = "1.0"
rand_chacha = "0.2.2"
[[bench]]
name = "bench"
@@ -300,8 +300,9 @@ impl offchain::Externalities for TestOffchainExt {
ids.iter()
.map(|id| match state.requests.get(id) {
Some(req) if req.response.is_none() =>
panic!("No `response` provided for request with id: {:?}", id),
Some(req) if req.response.is_none() => {
panic!("No `response` provided for request with id: {:?}", id)
},
None => RequestStatus::Invalid,
_ => RequestStatus::Finished(200),
})
@@ -17,10 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
honggfuzz = "0.5"
rand = { version = "0.7.3", features = ["std", "small_rng"] }
sp-arithmetic = { version = "4.0.0-dev", path = "../../arithmetic" }
sp-npos-elections = { version = "4.0.0-dev", path = ".." }
sp-runtime = { version = "4.0.0-dev", path = "../../runtime" }
sp-std = { version = "4.0.0-dev", path = "../../std" }
structopt = "0.3.21"
[[bin]]
@@ -22,6 +22,7 @@ proc-macro-crate = "1.0.0"
[dev-dependencies]
parity-scale-codec = "2.0.1"
sp-arithmetic = { path = "../../arithmetic", version = "4.0.0-dev"}
sp-npos-elections = { path = "..", version = "4.0.0-dev"}
sp-arithmetic = { path = "../../arithmetic", version = "4.0.0-dev" }
# used by generate_solution_type:
sp-npos-elections = { path = "..", version = "4.0.0-dev" }
trybuild = "1.0.43"
+1 -8
View File
@@ -17,13 +17,6 @@ sp-core = { version = "4.0.0-dev", default-features = false, path = "../core" }
sp-api = { version = "4.0.0-dev", default-features = false, path = "../api" }
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../runtime" }
[dev-dependencies]
sp-state-machine = { version = "0.10.0-dev", default-features = false, path = "../state-machine" }
[features]
default = ["std"]
std = [
"sp-core/std",
"sp-api/std",
"sp-runtime/std"
]
std = ["sp-core/std", "sp-api/std", "sp-runtime/std"]
-1
View File
@@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
serde = { version = "1.0.126", features = ["derive"] }
sp-core = { version = "4.0.0-dev", path = "../core" }
tracing-core = "0.1.17"
rustc-hash = "1.1.0"
[dev-dependencies]
@@ -19,7 +19,6 @@ sp-runtime-interface-test-wasm = { version = "2.0.0", path = "../test-wasm" }
sp-runtime-interface-test-wasm-deprecated = { version = "2.0.0", path = "../test-wasm-deprecated" }
sp-state-machine = { version = "0.10.0-dev", path = "../../state-machine" }
sp-runtime = { version = "4.0.0-dev", path = "../../runtime" }
sp-core = { version = "4.0.0-dev", path = "../../core" }
sp-io = { version = "4.0.0-dev", path = "../../io" }
tracing = "0.1.25"
tracing-core = "0.1.17"
@@ -46,10 +46,12 @@ where
use sp_core::hexdisplay::HexDisplay;
match self {
Self::Raw(inner) => write!(f, "MultiAddress::Raw({})", HexDisplay::from(inner)),
Self::Address32(inner) =>
write!(f, "MultiAddress::Address32({})", HexDisplay::from(inner)),
Self::Address20(inner) =>
write!(f, "MultiAddress::Address20({})", HexDisplay::from(inner)),
Self::Address32(inner) => {
write!(f, "MultiAddress::Address32({})", HexDisplay::from(inner))
},
Self::Address20(inner) => {
write!(f, "MultiAddress::Address20({})", HexDisplay::from(inner))
},
_ => write!(f, "{:?}", self),
}
}
+11 -10
View File
@@ -11,19 +11,23 @@ readme = "README.md"
[package.metadata.docs.rs]
# let's default to wasm32
default-target = "wasm32-unknown-unknown"
default-target = "wasm32-unknown-unknown"
# with the tracing enabled
features = ["with-tracing"]
# allowing for linux-gnu here, too, allows for `std` to show up as well
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
[dependencies]
sp-std = { version = "4.0.0-dev", path = "../std", default-features = false}
codec = { version = "2.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"]}
sp-std = { version = "4.0.0-dev", path = "../std", default-features = false }
codec = { version = "2.0.0", package = "parity-scale-codec", default-features = false, features = [
"derive",
] }
tracing = { version = "0.1.25", default-features = false }
tracing-core = { version = "0.1.17", default-features = false }
log = { version = "0.4.8", optional = true }
tracing-subscriber = { version = "0.2.18", optional = true, features = ["tracing-log"] }
tracing-subscriber = { version = "0.2.19", optional = true, features = [
"tracing-log",
] }
parking_lot = { version = "0.10.0", optional = true }
erased-serde = { version = "0.3.9", optional = true }
serde = { version = "1.0.126", optional = true }
@@ -31,11 +35,8 @@ serde_json = { version = "1.0.41", optional = true }
slog = { version = "2.5.2", features = ["nested-values"], optional = true }
[features]
default = [ "std" ]
with-tracing = [
"codec/derive",
"codec/full",
]
default = ["std"]
with-tracing = ["codec/derive", "codec/full"]
std = [
"with-tracing",
"tracing/std",
@@ -48,5 +49,5 @@ std = [
"erased-serde",
"serde",
"serde_json",
"slog"
"slog",
]
+3 -2
View File
@@ -81,8 +81,9 @@ impl<L: TrieConfiguration> fmt::Display for Error<L> {
Error::TrieError(e) => write!(f, "Trie error: {}", e),
Error::IncompleteProof => write!(f, "Incomplete proof"),
Error::ExtraneousChildNode => write!(f, "Child node content with no root in proof"),
Error::ExtraneousChildProof(root) =>
write!(f, "Proof of child trie {:x?} not in parent proof", root.as_ref()),
Error::ExtraneousChildProof(root) => {
write!(f, "Proof of child trie {:x?} not in parent proof", root.as_ref())
},
Error::RootMismatch(root, expected) => write!(
f,
"Verification error, root is {:x?}, expected: {:x?}",
-1
View File
@@ -11,7 +11,6 @@ readme = "README.md"
[dependencies]
futures = "0.3.9"
futures-core = "0.3.4"
lazy_static = "1.4.0"
prometheus = { version = "0.11.0", default-features = false }
futures-timer = "3.0.2"
@@ -19,7 +19,6 @@ proc-macro = true
quote = "1.0.3"
syn = { version = "1.0.58", features = ["full", "fold", "extra-traits", "visit"] }
proc-macro2 = "1.0.28"
proc-macro-crate = "1.0.0"
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
[dev-dependencies]