Skip to content

Commit

Permalink
Remove dev-only features (#967)
Browse files Browse the repository at this point in the history
* Update Zepter config

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove dep features

zepter transpose features strip-dev-only

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Bump version

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fix bad deps

* fix runtime-benchmarks feature

* fix features

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bryan Chen <[email protected]>
  • Loading branch information
ggwpez and xlc authored Nov 19, 2023
1 parent b45942e commit 87b26ed
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 116 deletions.
4 changes: 3 additions & 1 deletion .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2
binary: 0.15.0

# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
Expand All @@ -18,6 +18,8 @@ workflows:
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std',
# Ignore the features of dependencies that are exclusively used as dev or build.
'--dep-kinds=normal:check,dev:ignore,build:ignore',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Check for Wasm
run: make dev-check
- name: Install Zepter
run: cargo install zepter --version 0.14.0 --locked -q -f --no-default-features && zepter --version
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
- name: Check Rust features
run: make dev-features-check
- name: Run tests
Expand Down
40 changes: 6 additions & 34 deletions asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ xcm-executor = { workspace = true }
# orml
orml-traits = { path = "../traits", version = "0.5.0-dev", default-features = false }

# for runtime-benchmarks
polkadot-runtime-common = { workspace = true, optional = true }

[dev-dependencies]
# substrate
pallet-balances = { workspace = true, features = ["std"] }
Expand All @@ -53,33 +56,21 @@ xcm-simulator = { workspace = true }
# orml
orml-tokens = { path = "../tokens" }
orml-xcm = { path = "../xcm" }
orml-xcm-support = { path = "../xcm-support", default-features = false }
orml-xcm-support = { path = "../xcm-support" }
orml-xtokens = { path = "../xtokens" }

[features]
default = [ "std" ]
std = [
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-core/std",
"frame-support/std",
"frame-system/std",
"log/std",
"orml-traits/std",
"orml-xcm-support/std",
"pallet-balances/std",
"pallet-message-queue/std",
"pallet-xcm/std",
"parachain-info/std",
"parity-scale-codec/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"polkadot-runtime-parachains/std",
"polkadot-runtime-common?/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
Expand All @@ -88,37 +79,18 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"orml-tokens/runtime-benchmarks",
"orml-xtokens/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-dmp-queue/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-xcmp-queue/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml-tokens/try-runtime",
"orml-xcm/try-runtime",
"orml-xtokens/try-runtime",
"pallet-balances/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polkadot-runtime-common/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"polkadot-runtime-common?/try-runtime",
"sp-runtime/try-runtime",
]
2 changes: 0 additions & 2 deletions auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
]
Expand Down
8 changes: 0 additions & 8 deletions authority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ default = [ "std" ]
std = [
"frame-support/std",
"frame-system/std",
"pallet-preimage/std",
"pallet-root-testing/std",
"pallet-scheduler/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
Expand All @@ -44,15 +41,10 @@ std = [
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-preimage/try-runtime",
"pallet-root-testing/try-runtime",
"pallet-scheduler/try-runtime",
"sp-runtime/try-runtime",
]
1 change: 0 additions & 1 deletion benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ default = [ "std" ]
std = [
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"log/std",
"parity-scale-codec/std",
"scale-info/std",
Expand Down
4 changes: 0 additions & 4 deletions currencies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,15 @@ std = [
"frame-system/std",
"orml-traits/std",
"orml-utilities/std",
"pallet-balances/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml_tokens/try-runtime",
"pallet-balances/try-runtime",
"sp-runtime/try-runtime",
]
2 changes: 0 additions & 2 deletions nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
]
Expand Down
1 change: 0 additions & 1 deletion oracle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ std = [
"scale-info/std",
"serde",
"sp-application-crypto/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
Expand Down
1 change: 0 additions & 1 deletion parameters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ std = [
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
]
Expand Down
6 changes: 1 addition & 5 deletions payments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,22 @@ serde = "1.0.136"
sp-core = { workspace = true }
sp-io = { workspace = true }

orml-tokens = { path = "../tokens", version = "0.5.0-dev", default-features = false }
orml-tokens = { path = "../tokens", version = "0.5.0-dev" }

[features]
default = [ 'std' ]
std = [
'frame-support/std',
'frame-system/std',
'log/std',
'orml-tokens/std',
'orml-traits/std',
'parity-scale-codec/std',
'scale-info/std',
"sp-core/std",
"sp-io/std",
'sp-runtime/std',
'sp-std/std',
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml-tokens/try-runtime",
"sp-runtime/try-runtime",
]
10 changes: 0 additions & 10 deletions tokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,20 @@ std = [
"frame-system/std",
"log/std",
"orml-traits/std",
"pallet-elections-phragmen/std",
"pallet-treasury/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-arithmetic/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-staking/std",
"sp-std/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-elections-phragmen/try-runtime",
"pallet-treasury/try-runtime",
"sp-runtime/try-runtime",
]
9 changes: 1 addition & 8 deletions unknown-tokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ]
1 change: 0 additions & 1 deletion utilities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ frame-system = { workspace = true, features = ["std"] }
default = [ "std" ]
std = [
"frame-support/std",
"frame-system/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
Expand Down
4 changes: 0 additions & 4 deletions vesting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,20 @@ default = [ "std" ]
std = [
"frame-support/std",
"frame-system/std",
"pallet-balances/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
]
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",
]
1 change: 0 additions & 1 deletion xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
"sp-std/std",
"xcm-executor/std",
"xcm/std",
]
try-runtime = [
Expand Down
32 changes: 0 additions & 32 deletions xtokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,64 +60,32 @@ orml-xcm = { path = "../xcm" }
[features]
default = [ "std" ]
std = [
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-core/std",
"frame-support/std",
"frame-system/std",
"log/std",
"orml-traits/std",
"orml-xcm-support/std",
"pallet-balances/std",
"pallet-message-queue/std",
"pallet-xcm/std",
"parachain-info/std",
"parity-scale-codec/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"polkadot-runtime-parachains/std",
"scale-info/std",
"serde",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"orml-tokens/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-dmp-queue/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-xcmp-queue/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml-tokens/try-runtime",
"orml-xcm/try-runtime",
"pallet-balances/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polkadot-runtime-common/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"sp-runtime/try-runtime",
]

0 comments on commit 87b26ed

Please sign in to comment.