mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 22:25:42 +00:00
[cumulus] Feature gates for rococo/westend related stuff in the parachains-common (#3041)
This PR avoids automatically pulling rococo/westend runtime constants into the runtime by default. Usually, we have testnet runtimes dedicated to rococo or westend, and therefore, we don't need both dependencies. Additionally, it prevents pulling rococo/westend-related items into the `polkadot-fellows` repo, as seen in the Cargo.lock [here](https://github.com/polkadot-fellows/runtimes/blob/main/Cargo.lock#L14137-L14151) and [here](https://github.com/polkadot-fellows/runtimes/blob/main/Cargo.lock#L9756-L9770). --------- Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
@@ -34,13 +34,15 @@ sp-std = { path = "../../../substrate/primitives/std", default-features = false
|
||||
|
||||
# Polkadot
|
||||
pallet-xcm = { path = "../../../polkadot/xcm/pallet-xcm", default-features = false }
|
||||
rococo-runtime-constants = { path = "../../../polkadot/runtime/rococo/constants", default-features = false }
|
||||
westend-runtime-constants = { path = "../../../polkadot/runtime/westend/constants", default-features = false }
|
||||
polkadot-core-primitives = { path = "../../../polkadot/core-primitives", default-features = false }
|
||||
polkadot-primitives = { path = "../../../polkadot/primitives", default-features = false }
|
||||
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false }
|
||||
xcm-executor = { package = "staging-xcm-executor", path = "../../../polkadot/xcm/xcm-executor", default-features = false }
|
||||
|
||||
# Polkadot - only for testnets
|
||||
rococo-runtime-constants = { path = "../../../polkadot/runtime/rococo/constants", default-features = false, optional = true }
|
||||
westend-runtime-constants = { path = "../../../polkadot/runtime/westend/constants", default-features = false, optional = true }
|
||||
|
||||
# Cumulus
|
||||
pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false }
|
||||
cumulus-primitives-core = { path = "../../primitives/core", default-features = false }
|
||||
@@ -73,14 +75,14 @@ std = [
|
||||
"parachain-info/std",
|
||||
"polkadot-core-primitives/std",
|
||||
"polkadot-primitives/std",
|
||||
"rococo-runtime-constants/std",
|
||||
"rococo-runtime-constants?/std",
|
||||
"scale-info/std",
|
||||
"sp-consensus-aura/std",
|
||||
"sp-core/std",
|
||||
"sp-io/std",
|
||||
"sp-runtime/std",
|
||||
"sp-std/std",
|
||||
"westend-runtime-constants/std",
|
||||
"westend-runtime-constants?/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
@@ -100,3 +102,7 @@ runtime-benchmarks = [
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
]
|
||||
|
||||
# Test runtimes specific features.
|
||||
rococo = ["rococo-runtime-constants"]
|
||||
westend = ["westend-runtime-constants"]
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
pub mod impls;
|
||||
pub mod message_queue;
|
||||
#[cfg(feature = "rococo")]
|
||||
pub mod rococo;
|
||||
#[cfg(feature = "westend")]
|
||||
pub mod westend;
|
||||
pub mod xcm_config;
|
||||
pub use constants::*;
|
||||
|
||||
Reference in New Issue
Block a user