Skip to content

Commit

Permalink
Fix features (paritytech#1194)
Browse files Browse the repository at this point in the history
* Manually fix conflicting ?

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove duplicates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Autofix feature propagation

zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="try-runtime:frame-try-runtime"
zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="runtime-benchmarks:frame-benchmarking"
zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --fix
zepter f f

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump zepter

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add some duplicates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Add some duplicates"

This reverts commit c6ce627.

* Remove default enabled features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump Zepter

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump in correct location 🤦

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* DNM: Add some mistakes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* DNM: Add some mistakes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "DNM: Add some mistakes"

This reverts commit d469b3f.

* Revert "DNM: Add some mistakes"

This reverts commit d892a73.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez authored Aug 28, 2023
1 parent 6e394f8 commit 0400ed9
Show file tree
Hide file tree
Showing 74 changed files with 632 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cargo-fmt-manifest:
- .docker-env
- .common-refs
script:
- cargo install zepter --locked --version 0.10.0 -q -f --no-default-features && zepter --version
- cargo install zepter --locked --version 0.11.0 -q -f --no-default-features && zepter --version
- echo "👉 Hello developer! If you see this CI check failing then it means that one of the your changes in a Cargo.toml file introduced ill-formatted or unsorted features. Please take a look at 'docs/STYLE_GUIDE.md#manifest-formatting' to find out more."
- zepter format features --check
allow_failure: true # Experimental
Expand Down Expand Up @@ -97,7 +97,7 @@ test-rust-feature-propagation:
- .kubernetes-env
- .test-pr-refs
script:
- cargo install --locked --version 0.10.0 -q -f zepter && zepter --version
- cargo install --locked --version 0.11.1 -q -f zepter && zepter --version
- echo "👉 Hello developer! If you see this CI check failing then it means that one of the crates is missing a feature for one of its dependencies. The output below tells you which feature needs to be added for which dependency to which crate. You can do this by modifying the Cargo.toml file. For more context see the MR where this check was introduced https://github.com/paritytech/substrate/pull/14660"
- zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --feature-enables-dep="try-runtime:frame-try-runtime" --locked
- zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --feature-enables-dep="runtime-benchmarks:frame-benchmarking" --locked
Expand Down
6 changes: 6 additions & 0 deletions cumulus/bridges/bin/runtime-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ std = [
"bp-messages/std",
"bp-parachains/std",
"bp-polkadot-core/std",
"bp-relayers/std",
"bp-runtime/std",
"bp-xcm-bridge-hub-router/std",
"codec/std",
Expand All @@ -79,10 +80,15 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bridge-grandpa/runtime-benchmarks",
"pallet-bridge-messages/runtime-benchmarks",
"pallet-bridge-parachains/runtime-benchmarks",
"pallet-bridge-relayers/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]
integrity-test = [ "static_assertions" ]
9 changes: 8 additions & 1 deletion cumulus/bridges/modules/grandpa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,12 @@ std = [
runtime-benchmarks = [
"bp-test-utils",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
15 changes: 13 additions & 2 deletions cumulus/bridges/modules/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,16 @@ std = [
"sp-runtime/std",
"sp-std/std",
]
runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks" ]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"sp-runtime/try-runtime",
]
15 changes: 13 additions & 2 deletions cumulus/bridges/modules/parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,16 @@ std = [
"sp-std/std",
"sp-trie/std",
]
runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks" ]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-bridge-grandpa/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-bridge-grandpa/try-runtime",
"sp-runtime/try-runtime",
]
18 changes: 16 additions & 2 deletions cumulus/bridges/modules/relayers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,24 @@ std = [
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-bridge-messages/std",
"scale-info/std",
"sp-arithmetic/std",
"sp-runtime/std",
"sp-std/std",
]
runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks" ]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bridge-messages/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"pallet-bridge-messages/try-runtime",
"sp-runtime/try-runtime",
]
9 changes: 8 additions & 1 deletion cumulus/bridges/modules/xcm-bridge-hub-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ std = [
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
3 changes: 3 additions & 0 deletions cumulus/bridges/primitives/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ sp-trie = { path = "../../../../substrate/primitives/trie", default-features = f
default = [ "std" ]
std = [
"bp-header-chain/std",
"bp-parachains/std",
"bp-polkadot-core/std",
"bp-runtime/std",
"codec/std",
"ed25519-dalek/std",
"finality-grandpa/std",
Expand All @@ -33,4 +35,5 @@ std = [
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
"sp-trie/std",
]
10 changes: 9 additions & 1 deletion cumulus/pallets/aura-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ std = [
"frame-support/std",
"frame-system/std",
"pallet-aura/std",
"pallet-timestamp/std",
"scale-info/std",
"sp-application-crypto/std",
"sp-consensus-aura/std",
"sp-runtime/std",
"sp-std/std",
]
try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"cumulus-pallet-parachain-system/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-aura/try-runtime",
"pallet-timestamp/try-runtime",
"sp-runtime/try-runtime",
]
15 changes: 14 additions & 1 deletion cumulus/pallets/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]
std = [
"codec/std",
Expand All @@ -60,6 +64,15 @@ std = [
"sp-std/std",
]

try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-aura/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"sp-runtime/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
8 changes: 7 additions & 1 deletion cumulus/pallets/dmp-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ std = [
"frame-system/std",
"log/std",
"scale-info/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"sp-version/std",
"xcm/std",
]
try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
15 changes: 13 additions & 2 deletions cumulus/pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ std = [
"frame-support/std",
"frame-system/std",
"log/std",
"polkadot-parachain/std",
"scale-info/std",
"sp-core/std",
"sp-externalities/std",
"sp-inherents/std",
"sp-io/std",
"sp-runtime/std",
"sp-state-machine/std",
Expand All @@ -74,8 +76,17 @@ std = [
"xcm/std",
]

runtime-benchmarks = [ "sp-runtime/runtime-benchmarks" ]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]

try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]

parameterized-consensus-hook = []
1 change: 1 addition & 0 deletions cumulus/pallets/session-benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
std = [
"frame-benchmarking/std",
Expand Down
8 changes: 7 additions & 1 deletion cumulus/pallets/solo-to-para/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ std = [
"sp-runtime/std",
"sp-std/std",
]
try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"cumulus-pallet-parachain-system/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-sudo/try-runtime",
"sp-runtime/try-runtime",
]
7 changes: 6 additions & 1 deletion cumulus/pallets/xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ std = [
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm/std",
]
try-runtime = [ "frame-support/try-runtime" ]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
15 changes: 14 additions & 1 deletion cumulus/pallets/xcmp-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ default = [ "std" ]
std = [
"codec/std",
"cumulus-primitives-core/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"log/std",
Expand All @@ -58,9 +59,21 @@ std = [
]

runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-parachain-system/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"polkadot-runtime-common/try-runtime",
"sp-runtime/try-runtime",
]
try-runtime = [ "frame-support/try-runtime" ]
11 changes: 10 additions & 1 deletion cumulus/parachain-template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,19 @@ substrate-build-script-utils = { path = "../../../substrate/utils/build-script-u
[features]
default = []
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"parachain-template-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"parachain-template-runtime/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
try-runtime = [ "parachain-template-runtime/try-runtime" ]
network-protocol-staging = [
"cumulus-client-service/network-protocol-staging",
"polkadot-cli/network-protocol-staging",
Expand Down
16 changes: 14 additions & 2 deletions cumulus/parachain-template/pallets/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,24 @@ sp-runtime = { path = "../../../../substrate/primitives/runtime", default-featur

[features]
default = [ "std" ]
runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks" ]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
std = [
"codec/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
try-runtime = [ "frame-support/try-runtime" ]
Loading

0 comments on commit 0400ed9

Please sign in to comment.