Skip to content

Commit

Permalink
chore: remove unused dependencies (#387)
Browse files Browse the repository at this point in the history
* chore: remove unused dependencies

* chore: update all.fish script to test all targtes and not run actual tests
  • Loading branch information
ntn-x2 authored and wischli committed Aug 30, 2022
1 parent b59456e commit 3fb6168
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 458 deletions.
413 changes: 2 additions & 411 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "p
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
Expand All @@ -93,10 +92,6 @@ frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch =
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

# Runtime tests
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-ranked-collective = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}

[features]
Expand All @@ -106,14 +101,12 @@ fast-gov = [
"runtime-common/fast-gov",
]
runtime-benchmarks = [
"pallet-conviction-voting/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-did-lookup/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"peregrine-runtime/runtime-benchmarks",
"spiritnet-runtime/runtime-benchmarks",
]
try-runtime = [
"node-executor",
"peregrine-runtime/try-runtime",
"spiritnet-runtime/try-runtime",
"try-runtime-cli",
Expand Down
5 changes: 1 addition & 4 deletions nodes/standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,13 @@ frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch =
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

# Runtime tests
pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}

[features]
default = []
runtime-benchmarks = [
"mashnet-node-runtime/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-did-lookup/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
]
try-runtime = [
Expand Down
5 changes: 0 additions & 5 deletions pallets/parachain-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

[dependencies]
hex-literal = "0.3.4"
log = "0.4.17"
parity-scale-codec = {version = "3.1.5", default-features = false, features = ["derive"]}
scale-info = {version = "2.1.1", default-features = false, features = ["derive"]}
serde = {version = "1.0.137", optional = true}

kilt-support = {default-features = false, path = "../../support"}

frame-support = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", default-features = false}
frame-system = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", default-features = false}
pallet-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", default-features = false}
Expand All @@ -43,7 +40,6 @@ runtime-benchmarks = [
std = [
"frame-support/std",
"frame-system/std",
"kilt-support/std",
"log/std",
"pallet-authorship/std",
"pallet-balances/std",
Expand All @@ -57,5 +53,4 @@ std = [
]
try-runtime = [
"frame-support/try-runtime",
"kilt-support/try-runtime",
]
1 change: 0 additions & 1 deletion rpc/did/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ did-rpc-runtime-api = {version = "1.6.2", path = "./runtime-api"}
sp-api = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25"}
sp-core = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25"}
sp-rpc = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25"}
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25"}

[features]
Expand Down
4 changes: 0 additions & 4 deletions runtimes/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ xcm = {git = "https://github.com/paritytech/polkadot", default-features = false,
xcm-builder = {git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.25"}
xcm-executor = {git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.25"}

# Runtime tests
frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25", optional = true}

[features]
default = ["std"]
fast-gov = []
Expand Down Expand Up @@ -70,5 +67,4 @@ std = [
]
try-runtime = [
"frame-support/try-runtime",
"frame-try-runtime",
]
4 changes: 0 additions & 4 deletions runtimes/peregrine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ xcm-executor = {git = "https://github.com/paritytech/polkadot", default-features
# Benchmarking
cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.25"}
frame-system-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.25"}
rococo-runtime = {git = "https://github.com/paritytech/polkadot", default-features = false, optional = true, branch = "release-v0.9.25"}

# Runtime tests
frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25", optional = true}
Expand Down Expand Up @@ -132,7 +131,6 @@ runtime-benchmarks = [
"pallet-vesting/runtime-benchmarks",
"pallet-web3-names/runtime-benchmarks",
"parachain-staking/runtime-benchmarks",
"rococo-runtime/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand All @@ -143,7 +141,6 @@ std = [
"ctype/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"delegation/std",
Expand Down Expand Up @@ -182,7 +179,6 @@ std = [
"parachain-info/std",
"parachain-staking/std",
"polkadot-parachain/std",
"rococo-runtime/std",
"runtime-common/std",
"scale-info/std",
"serde",
Expand Down
3 changes: 0 additions & 3 deletions runtimes/spiritnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ xcm-executor = {git = "https://github.com/paritytech/polkadot", default-features
# Benchmarking
cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.25"}
frame-system-benchmarking = {git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.25"}
rococo-runtime = {git = "https://github.com/paritytech/polkadot", default-features = false, optional = true, branch = "release-v0.9.25"}

# Runtime tests
frame-try-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.25", optional = true}
Expand Down Expand Up @@ -144,7 +143,6 @@ std = [
"ctype/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"delegation/std",
Expand Down Expand Up @@ -182,7 +180,6 @@ std = [
"parachain-info/std",
"parachain-staking/std",
"polkadot-parachain/std",
"rococo-runtime/std",
"runtime-common/std",
"scale-info/std",
"serde",
Expand Down
4 changes: 0 additions & 4 deletions runtimes/standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pallet-sudo = {branch = "polkadot-v0.9.25", default-features = false, git = "htt
pallet-timestamp = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
pallet-transaction-payment = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
pallet-utility = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
pallet-vesting = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
sp-api = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
sp-arithmetic = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
sp-block-builder = {branch = "polkadot-v0.9.25", default-features = false, git = "https://github.com/paritytech/substrate"}
Expand Down Expand Up @@ -89,7 +88,6 @@ runtime-benchmarks = [
"pallet-indices/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-web3-names/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
Expand Down Expand Up @@ -121,7 +119,6 @@ std = [
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-web3-names/std",
"pallet-vesting/std",
"runtime-common/std",
"scale-info/std",
"serde",
Expand Down Expand Up @@ -162,5 +159,4 @@ try-runtime = [
"pallet-web3-names/try-runtime",
"pallet-utility/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-vesting/try-runtime",
]
16 changes: 2 additions & 14 deletions scripts/all.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,13 @@ echo "Features check started..."

for features in "--features default" "--all-features" "--features runtime-benchmarks" "--features try-runtime"
for package in (cargo workspaces list)
cargo check -p $package (echo $features | string split " ") > /dev/null ^ /dev/null
cargo clippy -p $package --all-targets (echo $features | string split " ") > /dev/null ^ /dev/null
if [ "$status" = "0" ]
echo -n "[ok] "
else
echo -n "[fail] "
end
echo cargo check -p $package (echo $features | string split " ")
end
end

for features in "--features default" "--all-features" "--features runtime-benchmarks" "--features try-runtime"
for package in (cargo workspaces list)
cargo test -p $package (echo $features | string split " ") > /dev/null ^ /dev/null
if [ "$status" = "0" ]
echo -n "[ok] "
else
echo -n "[fail] "
end
echo cargo test -p $package (echo $features | string split " ")
echo cargo clippy -p $package --all-targets (echo $features | string split " ")
end
end

Expand Down

0 comments on commit 3fb6168

Please sign in to comment.