Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit b7c18f1

Browse files
authored
Format and Sort features in Cargo.toml files (#14803)
* CI: Add feature sorting check Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Sort all features Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add some mistakes Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Revert "Add some mistakes" This reverts commit b2b1099. * CI job naming Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add oneliner formatting Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Explain tool Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use latest version Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Better erorr message Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Format after master merge Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use --check option Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Messed up the merge commit... Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
1 parent df383f2 commit b7c18f1

File tree

161 files changed

+1058
-1136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1058
-1136
lines changed

Diff for: bin/node-template/node/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ substrate-build-script-utils = { version = "3.0.0", path = "../../../utils/build
7070
default = []
7171
# Dependencies that are only required if runtime benchmarking should be build.
7272
runtime-benchmarks = [
73-
"node-template-runtime/runtime-benchmarks",
74-
"frame-benchmarking/runtime-benchmarks",
7573
"frame-benchmarking-cli/runtime-benchmarks",
74+
"frame-benchmarking/runtime-benchmarks",
7675
"frame-system/runtime-benchmarks",
76+
"node-template-runtime/runtime-benchmarks",
7777
"sc-service/runtime-benchmarks",
78-
"sp-runtime/runtime-benchmarks"
78+
"sp-runtime/runtime-benchmarks",
7979
]
8080
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
8181
# in the near future.
8282
try-runtime = [
83-
"node-template-runtime/try-runtime",
84-
"try-runtime-cli/try-runtime",
8583
"frame-system/try-runtime",
84+
"node-template-runtime/try-runtime",
8685
"pallet-transaction-payment/try-runtime",
87-
"sp-runtime/try-runtime"
86+
"sp-runtime/try-runtime",
87+
"try-runtime-cli/try-runtime",
8888
]

Diff for: bin/node-template/pallets/template/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sp-io = { version = "23.0.0", path = "../../../../primitives/io" }
2727
sp-runtime = { version = "24.0.0", path = "../../../../primitives/runtime" }
2828

2929
[features]
30-
default = ["std"]
30+
default = [ "std" ]
3131
std = [
3232
"codec/std",
3333
"frame-benchmarking?/std",
@@ -36,16 +36,16 @@ std = [
3636
"scale-info/std",
3737
"sp-core/std",
3838
"sp-io/std",
39-
"sp-runtime/std"
39+
"sp-runtime/std",
4040
]
4141
runtime-benchmarks = [
4242
"frame-benchmarking/runtime-benchmarks",
4343
"frame-support/runtime-benchmarks",
4444
"frame-system/runtime-benchmarks",
45-
"sp-runtime/runtime-benchmarks"
45+
"sp-runtime/runtime-benchmarks",
4646
]
4747
try-runtime = [
4848
"frame-support/try-runtime",
4949
"frame-system/try-runtime",
50-
"sp-runtime/try-runtime"
50+
"sp-runtime/try-runtime",
5151
]

Diff for: bin/node-template/runtime/Cargo.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,17 @@ pallet-template = { version = "4.0.0-dev", default-features = false, path = "../
5454
substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-builder", optional = true }
5555

5656
[features]
57-
default = ["std"]
57+
default = [ "std" ]
5858
std = [
59-
"frame-try-runtime?/std",
60-
"frame-system-benchmarking?/std",
61-
"frame-benchmarking?/std",
6259
"codec/std",
63-
"scale-info/std",
60+
"frame-benchmarking?/std",
6461
"frame-executive/std",
6562
"frame-support/std",
63+
"frame-system-benchmarking?/std",
6664
"frame-system-rpc-runtime-api/std",
6765
"frame-system/std",
6866
"frame-try-runtime/std",
67+
"frame-try-runtime?/std",
6968
"pallet-aura/std",
7069
"pallet-balances/std",
7170
"pallet-grandpa/std",
@@ -74,6 +73,7 @@ std = [
7473
"pallet-timestamp/std",
7574
"pallet-transaction-payment-rpc-runtime-api/std",
7675
"pallet-transaction-payment/std",
76+
"scale-info/std",
7777
"sp-api/std",
7878
"sp-block-builder/std",
7979
"sp-consensus-aura/std",
@@ -101,17 +101,17 @@ runtime-benchmarks = [
101101
"sp-runtime/runtime-benchmarks",
102102
]
103103
try-runtime = [
104-
"frame-try-runtime/try-runtime",
105104
"frame-executive/try-runtime",
106-
"frame-system/try-runtime",
107105
"frame-support/try-runtime",
106+
"frame-system/try-runtime",
107+
"frame-try-runtime/try-runtime",
108108
"pallet-aura/try-runtime",
109109
"pallet-balances/try-runtime",
110110
"pallet-grandpa/try-runtime",
111111
"pallet-sudo/try-runtime",
112112
"pallet-template/try-runtime",
113113
"pallet-timestamp/try-runtime",
114114
"pallet-transaction-payment/try-runtime",
115-
"sp-runtime/try-runtime"
115+
"sp-runtime/try-runtime",
116116
]
117-
experimental = ["pallet-aura/experimental"]
117+
experimental = [ "pallet-aura/experimental" ]

Diff for: bin/node/cli/Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -147,45 +147,45 @@ pallet-balances = { version = "4.0.0-dev", path = "../../../frame/balances" }
147147
sc-storage-monitor = { version = "0.1.0", path = "../../../client/storage-monitor" }
148148

149149
[features]
150-
default = ["cli"]
150+
default = [ "cli" ]
151151
cli = [
152+
"clap",
153+
"clap_complete",
154+
"frame-benchmarking-cli",
152155
"node-inspect",
153156
"sc-cli",
154-
"frame-benchmarking-cli",
155-
"substrate-frame-cli",
156157
"sc-service/rocksdb",
157-
"clap",
158-
"clap_complete",
159158
"substrate-build-script-utils",
159+
"substrate-frame-cli",
160160
"try-runtime-cli",
161161
]
162162
runtime-benchmarks = [
163-
"kitchensink-runtime/runtime-benchmarks",
164163
"frame-benchmarking-cli/runtime-benchmarks",
165164
"frame-system/runtime-benchmarks",
165+
"kitchensink-runtime/runtime-benchmarks",
166166
"pallet-asset-tx-payment/runtime-benchmarks",
167167
"pallet-assets/runtime-benchmarks",
168168
"pallet-balances/runtime-benchmarks",
169169
"pallet-im-online/runtime-benchmarks",
170170
"pallet-timestamp/runtime-benchmarks",
171171
"sc-client-db/runtime-benchmarks",
172172
"sc-service/runtime-benchmarks",
173-
"sp-runtime/runtime-benchmarks"
173+
"sp-runtime/runtime-benchmarks",
174174
]
175175
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
176176
# in the near future.
177177
try-runtime = [
178-
"kitchensink-runtime/try-runtime",
179-
"try-runtime-cli/try-runtime",
180178
"frame-system/try-runtime",
179+
"kitchensink-runtime/try-runtime",
181180
"pallet-asset-conversion-tx-payment/try-runtime",
182181
"pallet-asset-tx-payment/try-runtime",
183182
"pallet-assets/try-runtime",
184183
"pallet-balances/try-runtime",
185184
"pallet-im-online/try-runtime",
186185
"pallet-timestamp/try-runtime",
187186
"sp-runtime/try-runtime",
188-
"substrate-cli-test-utils/try-runtime"
187+
"substrate-cli-test-utils/try-runtime",
188+
"try-runtime-cli/try-runtime",
189189
]
190190

191191
[[bench]]

Diff for: bin/node/primitives/Cargo.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ sp-core = { version = "21.0.0", default-features = false, path = "../../../primi
1717
sp-runtime = { version = "24.0.0", default-features = false, path = "../../../primitives/runtime" }
1818

1919
[features]
20-
default = ["std"]
21-
std = [
22-
"sp-core/std",
23-
"sp-runtime/std",
24-
]
20+
default = [ "std" ]
21+
std = [ "sp-core/std", "sp-runtime/std" ]

0 commit comments

Comments
 (0)