Skip to content

Commit b310e93

Browse files
authored
Merge pull request #333 from opentensor/fix/propagate-features
fix: feature propagation
2 parents 1f320bc + 61f9268 commit b310e93

File tree

12 files changed

+182
-12
lines changed

12 files changed

+182
-12
lines changed

.github/workflows/check-rust.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ concurrency:
44
group: ci-${{ github.ref }}
55
cancel-in-progress: true
66

7-
87
on:
98
## Run automatically for all PRs against main, regardless of what the changes are
109
## to be safe and so we can more easily force re-run the CI when github is being
@@ -270,8 +269,8 @@ jobs:
270269
cargo clippy -- -D clippy::panic \
271270
-D clippy::todo \
272271
-D clippy::unimplemented
273-
# -D clippy::indexing_slicing \
274-
# -D clippy::unwrap_used \
272+
# -D clippy::indexing_slicing \
273+
# -D clippy::unwrap_used \
275274

276275
# ensures cargo fix has no trivial changes that can be applied
277276
cargo-fix:
@@ -331,3 +330,25 @@ jobs:
331330
else
332331
echo "No changes detected after running 'cargo fix --workspace' ✅"
333332
fi
333+
334+
check-feature-propagation:
335+
name: zepter run check
336+
runs-on: ubuntu-22.04
337+
338+
steps:
339+
- name: Install stable Rust
340+
uses: actions-rs/toolchain@v1
341+
with:
342+
profile: minimal
343+
toolchain: stable
344+
345+
- name: Install Zepter
346+
run: cargo install --locked -q zepter && zepter --version
347+
348+
- name: Checkout
349+
uses: actions/checkout@v3
350+
with:
351+
fetch-depth: 0 # Dont clone historic commits.
352+
353+
- name: Check features
354+
run: zepter run check

Cargo.lock

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ runtime-benchmarks = [
8585
"node-subtensor-runtime/runtime-benchmarks",
8686
"frame-benchmarking/runtime-benchmarks",
8787
"frame-benchmarking-cli/runtime-benchmarks",
88+
"frame-system/runtime-benchmarks",
89+
"sc-service/runtime-benchmarks",
90+
"sp-runtime/runtime-benchmarks",
91+
"pallet-commitments/runtime-benchmarks"
8892
]
8993
pow-faucet = []
9094

@@ -93,4 +97,8 @@ pow-faucet = []
9397
try-runtime = [
9498
"node-subtensor-runtime/try-runtime",
9599
"try-runtime-cli/try-runtime",
100+
"frame-system/try-runtime",
101+
"pallet-transaction-payment/try-runtime",
102+
"sp-runtime/try-runtime",
103+
"pallet-commitments/try-runtime"
96104
]

pallets/admin-utils/Cargo.toml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ std = [
4848
"scale-info/std",
4949
"pallet-subtensor/std",
5050
"sp-consensus-aura/std",
51+
"pallet-balances/std",
52+
"sp-runtime/std",
53+
"sp-tracing/std",
54+
"sp-weights/std",
55+
"log/std"
56+
]
57+
runtime-benchmarks = [
58+
"frame-benchmarking/runtime-benchmarks",
59+
"frame-support/runtime-benchmarks",
60+
"frame-system/runtime-benchmarks",
61+
"pallet-balances/runtime-benchmarks",
62+
"sp-runtime/runtime-benchmarks",
63+
"pallet-subtensor/runtime-benchmarks"
64+
]
65+
try-runtime = [
66+
"frame-support/try-runtime",
67+
"frame-system/try-runtime",
68+
"pallet-balances/try-runtime",
69+
"sp-runtime/try-runtime",
70+
"pallet-subtensor/try-runtime"
5171
]
52-
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
53-
try-runtime = ["frame-support/try-runtime"]

pallets/collective/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ runtime-benchmarks = [
4848
"frame-system/runtime-benchmarks",
4949
"sp-runtime/runtime-benchmarks",
5050
]
51-
try-runtime = ["frame-support/try-runtime"]
51+
try-runtime = [
52+
"frame-support/try-runtime",
53+
"frame-system/try-runtime",
54+
"sp-runtime/try-runtime"
55+
]

pallets/commitments/Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,19 @@ std = [
4343
"frame-system/std",
4444
"scale-info/std",
4545
"sp-std/std",
46+
"sp-runtime/std",
47+
"enumflags2/std"
4648
]
4749
runtime-benchmarks = [
4850
"frame-benchmarking/runtime-benchmarks",
4951
"frame-support/runtime-benchmarks",
5052
"frame-system/runtime-benchmarks",
5153
"sp-runtime/runtime-benchmarks",
54+
"pallet-balances/runtime-benchmarks"
55+
]
56+
try-runtime = [
57+
"frame-support/try-runtime",
58+
"frame-system/try-runtime",
59+
"pallet-balances/try-runtime",
60+
"sp-runtime/try-runtime"
5261
]
53-
try-runtime = ["frame-support/try-runtime"]

pallets/registry/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ std = [
4242
"frame-system/std",
4343
"scale-info/std",
4444
"sp-std/std",
45+
"sp-runtime/std",
46+
"enumflags2/std"
4547
]
4648
runtime-benchmarks = [
4749
"frame-benchmarking/runtime-benchmarks",
4850
"frame-support/runtime-benchmarks",
4951
"frame-system/runtime-benchmarks",
5052
"sp-runtime/runtime-benchmarks",
5153
]
52-
try-runtime = ["frame-support/try-runtime"]
54+
try-runtime = [
55+
"frame-support/try-runtime",
56+
"frame-system/try-runtime",
57+
"sp-runtime/try-runtime"
58+
]

pallets/subtensor/Cargo.toml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,41 @@ std = [
6868
"scale-info/std",
6969
"pallet-collective/std",
7070
"pallet-membership/std",
71+
"substrate-fixed/std",
72+
"pallet-balances/std",
73+
"pallet-transaction-payment/std",
74+
"pallet-utility/std",
75+
"sp-core/std",
76+
"sp-io/std",
77+
"sp-runtime/std",
78+
"sp-std/std",
79+
"sp-tracing/std",
80+
"sp-version/std",
81+
"hex/std",
82+
"log/std",
83+
"ndarray/std",
84+
"serde/std",
85+
"serde_bytes/std",
86+
"serde_with/std"
87+
]
88+
runtime-benchmarks = [
89+
"frame-benchmarking/runtime-benchmarks",
90+
"frame-support/runtime-benchmarks",
91+
"frame-system/runtime-benchmarks",
92+
"pallet-balances/runtime-benchmarks",
93+
"pallet-membership/runtime-benchmarks",
94+
"pallet-utility/runtime-benchmarks",
95+
"sp-runtime/runtime-benchmarks",
96+
"pallet-collective/runtime-benchmarks"
97+
]
98+
try-runtime = [
99+
"frame-support/try-runtime",
100+
"frame-system/try-runtime",
101+
"pallet-balances/try-runtime",
102+
"pallet-membership/try-runtime",
103+
"pallet-transaction-payment/try-runtime",
104+
"pallet-utility/try-runtime",
105+
"sp-runtime/try-runtime",
106+
"pallet-collective/try-runtime"
71107
]
72-
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
73-
try-runtime = ["frame-support/try-runtime"]
74108
pow-faucet = []

pallets/subtensor/rpc/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@ pallet-subtensor = { version = "4.0.0-dev", path = "../../subtensor", default-fe
3232

3333
[features]
3434
default = ["std"]
35-
std = ["sp-api/std", "sp-runtime/std", "subtensor-custom-rpc-runtime-api/std"]
35+
std = [
36+
"sp-api/std",
37+
"sp-runtime/std",
38+
"subtensor-custom-rpc-runtime-api/std",
39+
"pallet-subtensor/std",
40+
"codec/std",
41+
"serde/std"
42+
]
3643
pow-faucet = []

pallets/subtensor/runtime-api/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ pallet-subtensor = { version = "4.0.0-dev", path = "../../subtensor", default-fe
1818

1919
[features]
2020
default = ["std"]
21-
std = ["sp-api/std"]
21+
std = [
22+
"sp-api/std",
23+
"frame-support/std",
24+
"pallet-subtensor/std",
25+
"serde/std"
26+
]
2227
pow-faucet = []

0 commit comments

Comments
 (0)