sp-runtime: make parity-util-mem dependency optional (#12657)

* `sp-runtime`: make `parity-util-mem` dependency optional

* Use default-features = false for sp-runtime in sp-keyring

* Remove parity-util-mem from sp-core

* Cargo.lock

* Restore default-features for keyring dependency
This commit is contained in:
Andrew Jones
2022-11-09 21:30:50 +00:00
committed by GitHub
parent 11a01e89e3
commit da46ab18ec
4 changed files with 3 additions and 7 deletions
-1
View File
@@ -9525,7 +9525,6 @@ dependencies = [
"merlin",
"num-traits",
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.12.1",
"primitive-types",
"rand 0.7.3",
-2
View File
@@ -40,7 +40,6 @@ sp-std = { version = "4.0.0", default-features = false, path = "../std" }
sp-debug-derive = { version = "4.0.0", default-features = false, path = "../debug-derive" }
sp-storage = { version = "6.0.0", default-features = false, path = "../storage" }
sp-externalities = { version = "0.12.0", optional = true, path = "../externalities" }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
futures = { version = "0.3.21", optional = true }
dyn-clonable = { version = "0.9.0", optional = true }
thiserror = { version = "1.0.30", optional = true }
@@ -78,7 +77,6 @@ bench = false
[features]
default = ["std"]
std = [
"parity-util-mem/std",
"merlin?/std",
"full_crypto",
"log/std",
+1 -1
View File
@@ -19,7 +19,7 @@ either = { version = "1.5", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-trait-for-tuples = "0.2.2"
log = { version = "0.4.17", default-features = false }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"], optional = true }
paste = "1.0"
rand = { version = "0.7.2", optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
@@ -226,9 +226,8 @@ impl From<UnknownTransaction> for TransactionValidity {
/// Depending on the source we might apply different validation schemes.
/// For instance we can disallow specific kinds of transactions if they were not produced
/// by our local node (for instance off-chain workers).
#[derive(
Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, parity_util_mem::MallocSizeOf,
)]
#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)]
#[cfg_attr(feature = "std", derive(parity_util_mem::MallocSizeOf))]
pub enum TransactionSource {
/// Transaction is already included in block.
///