Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Introduce udeps to remove unused dependencies
  • Loading branch information
yrong committed May 31, 2022
commit 1b5190469503130da4e8d8bf76f180e627af0067
32 changes: 0 additions & 32 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init: submodules
git config advice.ignoredHook false
git config core.hooksPath .githooks
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2022-04-24 --component rust-src --component rustfmt --component clippy --target wasm32-unknown-unknown
cargo install cargo-udeps --locked
cd scripts/helper && yarn
cd scripts/polkadot-launch && yarn

Expand Down Expand Up @@ -143,6 +144,10 @@ fmt:
SKIP_WASM_BUILD= cargo fmt --all
cd scripts/helper && yarn format

.PHONY: udeps
udeps:
SKIP_WASM_BUILD= cargo udeps -q --all-targets

.PHONY: resources
resources:
docker run --rm parallelfinance/parallel:$(DOCKER_TAG) export-genesis-state --chain $(CHAIN) > ./resources/para-$(PARA_ID)-genesis
Expand Down
1 change: 0 additions & 1 deletion node/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ sp-trie = { git = 'https://github.com/paritytech/substrate.git', bra
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
Expand Down
2 changes: 0 additions & 2 deletions pallets/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ scale-info = { version = '2.1', default-features = false, features = ['d

pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
Expand All @@ -37,7 +36,6 @@ std = [
'frame-system/std',
'frame-benchmarking/std',
'primitives/std',
'pallet-collective/std',
'pallet-assets/std',
'pallet-membership/std',
'pallet-balances/std',
Expand Down
2 changes: 0 additions & 2 deletions pallets/streaming/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ frame-system = { git = 'https://github.com/paritytech/substrate.git', bran
orml-traits = { version = '0.4.1-dev', default-features = false }
pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-prices = { path = '../prices', default-features = false }
pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false }
scale-info = { version = '2.1', default-features = false, features = ['derive'] }
Expand Down Expand Up @@ -44,7 +43,6 @@ std = [
'sp-std/std',
'pallet-assets/std',
'pallet-balances/std',
'pallet-prices/std',
'pallet-assets/std',
'pallet-timestamp/std',
'serde',
Expand Down
1 change: 0 additions & 1 deletion pallets/xcm-helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus
cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.22' }
kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.22', features = ['runtime-benchmarks'] }
orml-xcm-support = { version = '0.4.1-dev' }
orml-xtokens = { version = '0.4.1-dev' }
pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22' }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22' }
pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22' }
Expand Down
8 changes: 5 additions & 3 deletions runtime/heiko/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pallet-preimage = { git = 'https://github.com/parityt
pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
Expand Down Expand Up @@ -164,7 +163,6 @@ std = [
'pallet-crowdloans/std',
'pallet-xcm/std',
'pallet-timestamp/std',
'pallet-sudo/std',
'pallet-transaction-payment/std',
'pallet-transaction-payment-rpc-runtime-api/std',
'parachain-info/std',
Expand Down Expand Up @@ -225,7 +223,6 @@ try-runtime = [
'frame-system/try-runtime',
'pallet-balances/try-runtime',
'pallet-timestamp/try-runtime',
'pallet-sudo/try-runtime',
'pallet-transaction-payment/try-runtime',
'pallet-multisig/try-runtime',
'pallet-utility/try-runtime',
Expand Down Expand Up @@ -254,3 +251,8 @@ try-runtime = [
'pallet-xcm-helper/try-runtime',
'pallet-asset-registry/try-runtime',
]

[package.metadata.cargo-udeps.ignore]
normal = [
'frame-try-runtime',
]
6 changes: 0 additions & 6 deletions runtime/heiko/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,6 @@ impl pallet_transaction_payment::Config for Runtime {
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
}

// impl pallet_sudo::Config for Runtime {
// type Event = Event;
// type Call = Call;
// }

#[derive(
Copy,
Clone,
Expand Down Expand Up @@ -2012,7 +2007,6 @@ construct_runtime!(
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 8,

// Governance
// Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 11,
GeneralCouncil: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 12,
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 13,
Expand Down
5 changes: 5 additions & 0 deletions runtime/kerria/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,8 @@ try-runtime = [
'pallet-xcm-helper/try-runtime',
'pallet-asset-registry/try-runtime',
]

[package.metadata.cargo-udeps.ignore]
normal = [
'frame-try-runtime',
]
8 changes: 5 additions & 3 deletions runtime/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pallet-preimage = { git = 'https://github.com/parityt
pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
Expand Down Expand Up @@ -163,7 +162,6 @@ std = [
'pallet-balances/std',
'pallet-xcm/std',
'pallet-timestamp/std',
'pallet-sudo/std',
'pallet-transaction-payment/std',
'pallet-transaction-payment-rpc-runtime-api/std',
'parachain-info/std',
Expand Down Expand Up @@ -226,7 +224,6 @@ try-runtime = [
'frame-system/try-runtime',
'pallet-balances/try-runtime',
'pallet-timestamp/try-runtime',
'pallet-sudo/try-runtime',
'pallet-transaction-payment/try-runtime',
'pallet-multisig/try-runtime',
'pallet-utility/try-runtime',
Expand Down Expand Up @@ -256,3 +253,8 @@ try-runtime = [
'pallet-xcm-helper/try-runtime',
'pallet-asset-registry/try-runtime',
]

[package.metadata.cargo-udeps.ignore]
normal = [
'frame-try-runtime',
]
6 changes: 0 additions & 6 deletions runtime/parallel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,11 +882,6 @@ impl pallet_transaction_payment::Config for Runtime {
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
}

// impl pallet_sudo::Config for Runtime {
// type Event = Event;
// type Call = Call;
// }

#[derive(
Copy,
Clone,
Expand Down Expand Up @@ -2013,7 +2008,6 @@ construct_runtime!(
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 8,

// Governance
// Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 11,
GeneralCouncil: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 12,
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 13,
Expand Down
5 changes: 5 additions & 0 deletions runtime/vanilla/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,8 @@ try-runtime = [
'pallet-xcm-helper/try-runtime',
'pallet-asset-registry/try-runtime',
]

[package.metadata.cargo-udeps.ignore]
normal = [
'frame-try-runtime',
]
11 changes: 6 additions & 5 deletions support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ targets = ['x86_64-unknown-linux-gnu']
[dependencies]
serde = { version = '1.0.136', features = ['derive'], optional = true }
codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['max-encoded-len'], default-features = false }
frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
log = { version = "0.4", default-features = false }
num-bigint = { default-features = false, version = '0.4' }
num-traits = { default-features = false, version = '0.2' }
primitives = { package = 'parallel-primitives', path = '../primitives', default-features = false }
scale-info = { version = '2.1', default-features = false, features = ['derive'] }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.22', default-features = false }
substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false }

[dev-dependencies]
Expand All @@ -32,11 +30,9 @@ std = [
'serde',
'codec/std',
'frame-support/std',
'frame-system/std',
'sp-runtime/std',
'scale-info/std',
'sp-std/std',
'primitives/std',
'num-bigint/std',
'num-traits/std',
'sp-core/std',
Expand All @@ -46,3 +42,8 @@ try-runtime = ['frame-support/try-runtime']

[lib]
doctest = false

[package.metadata.cargo-udeps.ignore]
normal = [
'frame-support',
]