Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fixup some wrong dependencies #12899

Merged
merged 7 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions frame/fast-unstake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,16 @@ sp-std = { version = "5.0.0", default-features = false, path = "../../primitives
sp-staking = { default-features = false, path = "../../primitives/staking" }
frame-election-provider-support = { default-features = false, path = "../election-provider-support" }

# optional dependencies for cargo features
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" }
pallet-staking = { default-features = false, optional = true, path = "../staking" }
pallet-assets = { default-features = false, optional = true, path = "../assets" }

[dev-dependencies]
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
sp-core = { version = "7.0.0", default-features = false, path = "../../primitives/core" }
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" }
pallet-staking = { path = "../staking" }
pallet-staking = { path = "../staking", features = [ "runtime-benchmarks" ] }
pallet-balances = { path = "../balances" }
pallet-timestamp = { path = "../timestamp" }
pallet-assets = { path = "../assets" }


[features]
default = ["std"]
Expand All @@ -64,6 +59,5 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"pallet-staking/runtime-benchmarks"
]
try-runtime = ["frame-support/try-runtime"]
2 changes: 0 additions & 2 deletions frame/nomination-pools/benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ sp-runtime = { version = "7.0.0", default-features = false, path = "../../../pri
sp-runtime-interface = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime-interface" }
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/staking" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }
sp-io = { optional = true, default-features = false, path = "../../../primitives/io" }

[dev-dependencies]
pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../../balances" }
Expand All @@ -53,7 +52,6 @@ std = [
"pallet-nomination-pools/std",
"sp-runtime/std",
"sp-runtime-interface/std",
"sp-io/std",
"sp-staking/std",
"sp-std/std",
]
Expand Down
7 changes: 2 additions & 5 deletions frame/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ sp-application-crypto = { version = "7.0.0", default-features = false, path = ".
frame-election-provider-support = { version = "4.0.0-dev", default-features = false, path = "../election-provider-support" }
log = { version = "0.4.17", default-features = false }

# optional dependencies for cargo features
# Optional imports for benchmarking
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
rand_chacha = { version = "0.2", default-features = false, optional = true }
pallet-bags-list = { default-features = false, optional = true, path = "../bags-list" }
joao-paulo-parity marked this conversation as resolved.
Show resolved Hide resolved

[dev-dependencies]
sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" }
Expand All @@ -44,7 +43,7 @@ sp-npos-elections = { version = "4.0.0-dev", path = "../../primitives/npos-elect
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
pallet-timestamp = { version = "4.0.0-dev", path = "../timestamp" }
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
pallet-bags-list = { version = "4.0.0-dev", path = "../bags-list" }
pallet-bags-list = { version = "4.0.0-dev", path = "../bags-list", features = [ "runtime-benchmarks" ] }
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
frame-benchmarking = { version = "4.0.0-dev", path = "../benchmarking" }
frame-election-provider-support = { version = "4.0.0-dev", path = "../election-provider-support" }
Expand Down Expand Up @@ -75,10 +74,8 @@ runtime-benchmarks = [
"frame-election-provider-support/runtime-benchmarks",
"rand_chacha",
"sp-staking/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
fuzz = [
"pallet-bags-list/fuzz",
"frame-election-provider-support/fuzz",
]
6 changes: 1 addition & 5 deletions frame/transaction-payment/asset-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ sp-io = { version = "7.0.0", default-features = false, path = "../../../primitiv
sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }

# optional dependencies for cargo features
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../system" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = ".." }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../benchmarking", optional = true }
pallet-assets = { default-features = false, optional = true, path = "../../assets" }

# Other dependencies
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
Expand All @@ -36,11 +34,10 @@ serde_json = "1.0.85"

sp-storage = { version = "7.0.0", default-features = false, path = "../../../primitives/storage" }

pallet-assets = { version = "4.0.0-dev", path = "../../assets" }
pallet-assets = { version = "4.0.0-dev", path = "../../assets", features = [ "runtime-benchmarks" ] }
pallet-authorship = { version = "4.0.0-dev", path = "../../authorship" }
pallet-balances = { version = "4.0.0-dev", path = "../../balances" }


[features]
default = ["std"]
std = [
Expand All @@ -60,6 +57,5 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
9 changes: 5 additions & 4 deletions utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,15 @@ fn find_package_by_manifest_path<'a>(
if let Some(pkg) = crate_metadata.packages.iter().find(|p| p.manifest_path == manifest_path) {
return pkg
}

let pkgs_by_name = crate_metadata
.packages
.iter()
.filter(|p| p.name == pkg_name)
.collect::<Vec<_>>();
let mut pkgs = pkgs_by_name.iter();
if let Some(pkg) = pkgs.next() {
if pkgs.next().is_some() {

if let Some(pkg) = pkgs_by_name.first() {
if pkgs_by_name.len() > 1 {
panic!(
"Found multiple packages matching the name {pkg_name} ({manifest_path:?}): {:?}",
pkgs_by_name
Expand All @@ -395,7 +396,7 @@ fn find_package_by_manifest_path<'a>(
return pkg
}
} else {
panic!("Failed to find entry for package {pkg_name} ({manifest_path:?})");
panic!("Failed to find entry for package {pkg_name} ({manifest_path:?}).");
}
}

Expand Down