Skip to content

Commit 193190d

Browse files
ntn-x2Ad96el
andauthored
chore: sort TOML files (#645)
Built on top of #644. I applied the following: 1. Sort keys that were not sorted in the top-level `package` field for all crates 2. Replace all simple occurrences of a crate version (crate = "x.y.z) or workspace inheritance (package.workspace = true) with their object-based counterparts (crate = { version = "x.y.z" } and package = { workspace = true }) to keep our style consistent 3. Made sure the dependencies are listed as build dependencies first, then dev dependencies, then regular dependencies for all crates 4. Add the taplo formatter (thanks @Ad96el) I could not find any plug-ins or tools that would allow us to force any rules on the TOML files, so we'll have to try and stick with the current way, and hopefully it's now easier once all crates are consistent and can be copy-pasted to be used as templates for new ones. --------- Co-authored-by: Adel Golghalyani <ad96el@gmail.com>
1 parent 2dbefd4 commit 193190d

File tree

41 files changed

+1817
-1847
lines changed

Some content is hidden

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

41 files changed

+1817
-1847
lines changed

.gitlab-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ fmt:
1515
stage: test
1616
script:
1717
- cargo fmt -- --check
18+
- cargo install taplo-cli --version 0.9.0
19+
- taplo fmt --check
1820

1921
test:
2022
timeout: 2 hours

.rustfmt.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# for possible configuration values see https://github.com/rust-lang/rustfmt/blob/master/Configurations.md
22

3+
hard_tabs = true
34
imports_granularity = "Crate"
4-
hard_tabs = true
5-
max_width = 120
6-
wrap_comments = true
5+
max_width = 120
6+
wrap_comments = true

.taplo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
exclude = ["target-analyzer/**", "target/**"]
2+
3+
[formatting]
4+
align_entries = true
5+
allowed_blank_lines = 1
6+
reorder_arrays = true
7+
reorder_keys = true

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+204-202
Large diffs are not rendered by default.

crates/assets/Cargo.toml

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
[package]
2-
authors.workspace = true
3-
documentation.workspace = true
4-
edition.workspace = true
5-
homepage.workspace = true
6-
license-file.workspace = true
7-
readme.workspace = true
8-
repository.workspace = true
9-
version.workspace = true
10-
name = "kilt-asset-dids"
11-
description = "Asset DIDs and related structs, suitable for no_std environments."
2+
authors = { workspace = true }
3+
description = "Asset DIDs and related structs, suitable for no_std environments."
4+
documentation = { workspace = true }
5+
edition = { workspace = true }
6+
homepage = { workspace = true }
7+
license-file = { workspace = true }
8+
name = "kilt-asset-dids"
9+
readme = { workspace = true }
10+
repository = { workspace = true }
11+
version = { workspace = true }
1212

1313
[dependencies]
1414
# External dependencies
15-
base58.workspace = true
16-
hex = {workspace = true, features = ["alloc"]}
17-
hex-literal.workspace = true
18-
log.workspace = true
15+
base58 = { workspace = true }
16+
hex = { workspace = true, features = ["alloc"] }
17+
hex-literal = { workspace = true }
18+
log = { workspace = true }
1919

2020
# Parity dependencies
21-
parity-scale-codec = {workspace = true, features = ["derive"]}
22-
scale-info = {workspace = true, features = ["derive"]}
21+
parity-scale-codec = { workspace = true, features = ["derive"] }
22+
scale-info = { workspace = true, features = ["derive"] }
2323

2424
# Substrate dependencies
25-
frame-support.workspace = true
26-
sp-core.workspace = true
27-
sp-std.workspace = true
25+
frame-support = { workspace = true }
26+
sp-core = { workspace = true }
27+
sp-std = { workspace = true }
2828

2929
[features]
3030
default = ["std"]
3131
std = [
32+
"frame-support/std",
3233
"hex/std",
3334
"log/std",
3435
"parity-scale-codec/std",
3536
"scale-info/std",
36-
"frame-support/std",
3737
"sp-core/std",
3838
"sp-std/std",
3939
]

crates/kilt-dip-primitives/Cargo.toml

+49-49
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
11
[package]
2-
authors.workspace = true
3-
description = "Primitive types, traits, and functions for the KILT Decentralized Identity Provider (DIP) functionality as implemented by the KILT blockchain."
4-
documentation.workspace = true
5-
edition.workspace = true
6-
homepage.workspace = true
7-
license-file.workspace = true
8-
name = "kilt-dip-primitives"
9-
readme.workspace = true
10-
repository.workspace = true
11-
version.workspace = true
2+
authors = { workspace = true }
3+
description = "Primitive types, traits, and functions for the KILT Decentralized Identity Provider (DIP) functionality as implemented by the KILT blockchain."
4+
documentation = { workspace = true }
5+
edition = { workspace = true }
6+
homepage = { workspace = true }
7+
license-file = { workspace = true }
8+
name = "kilt-dip-primitives"
9+
readme = { workspace = true }
10+
repository = { workspace = true }
11+
version = { workspace = true }
12+
13+
[dev-dependencies]
14+
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
15+
enum-iterator = { workspace = true }
16+
hex-literal = { workspace = true }
17+
peregrine-runtime = { workspace = true, features = ["std"] }
18+
rococo-runtime = { workspace = true, features = ["std"] }
19+
sp-io = { workspace = true, features = ["std"] }
20+
spiritnet-runtime = { workspace = true, features = ["std"] }
1221

1322
[dependencies]
1423
# External dependencies
15-
hash-db.workspace = true
16-
log.workspace = true
24+
hash-db = { workspace = true }
25+
log = { workspace = true }
1726

1827
# Internal dependencies
19-
did.workspace = true
20-
kilt-support = {workspace = true, optional = true}
21-
pallet-did-lookup.workspace = true
22-
pallet-dip-consumer.workspace = true
23-
pallet-dip-provider.workspace = true
24-
pallet-relay-store.workspace = true
25-
pallet-web3-names.workspace = true
28+
did = { workspace = true }
29+
kilt-support = { workspace = true, optional = true }
30+
pallet-did-lookup = { workspace = true }
31+
pallet-dip-consumer = { workspace = true }
32+
pallet-dip-provider = { workspace = true }
33+
pallet-relay-store = { workspace = true }
34+
pallet-web3-names = { workspace = true }
2635

2736
# Parity dependencies
28-
parity-scale-codec = {workspace = true, features = ["derive"]}
29-
scale-info = {workspace = true, features = ["derive"]}
37+
parity-scale-codec = { workspace = true, features = ["derive"] }
38+
scale-info = { workspace = true, features = ["derive"] }
3039

3140
# Substrate dependencies
32-
frame-system.workspace = true
33-
frame-support.workspace = true
34-
sp-core.workspace = true
35-
sp-io.workspace = true
36-
sp-runtime.workspace = true
37-
sp-state-machine.workspace = true
38-
sp-std.workspace = true
39-
sp-trie.workspace = true
41+
frame-support = { workspace = true }
42+
frame-system = { workspace = true }
43+
sp-core = { workspace = true }
44+
sp-io = { workspace = true }
45+
sp-runtime = { workspace = true }
46+
sp-state-machine = { workspace = true }
47+
sp-std = { workspace = true }
48+
sp-trie = { workspace = true }
4049

4150
# Cumulus dependencies
42-
cumulus-primitives-core.workspace = true
43-
44-
[dev-dependencies]
45-
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
46-
enum-iterator.workspace = true
47-
hex-literal.workspace = true
48-
peregrine-runtime = { workspace = true, features = ["std"] }
49-
rococo-runtime = { workspace = true, features = ["std"] }
50-
spiritnet-runtime = { workspace = true, features = ["std"] }
51-
sp-io = { workspace = true, features = ["std"] }
51+
cumulus-primitives-core = { workspace = true }
5252

5353
[features]
5454
default = ["std"]
55+
runtime-benchmarks = [
56+
"kilt-support/runtime-benchmarks",
57+
"pallet-dip-consumer/runtime-benchmarks",
58+
"pallet-dip-provider/runtime-benchmarks",
59+
]
5560
std = [
56-
"hash-db/std",
57-
"log/std",
61+
"cumulus-primitives-core/std",
5862
"did/std",
63+
"frame-support/std",
64+
"frame-system/std",
65+
"hash-db/std",
5966
"kilt-support?/std",
67+
"log/std",
6068
"pallet-did-lookup/std",
6169
"pallet-dip-consumer/std",
6270
"pallet-dip-provider/std",
6371
"pallet-relay-store/std",
6472
"pallet-web3-names/std",
6573
"parity-scale-codec/std",
6674
"scale-info/std",
67-
"frame-system/std",
68-
"frame-support/std",
6975
"sp-core/std",
7076
"sp-io/std",
7177
"sp-runtime/std",
7278
"sp-state-machine/std",
7379
"sp-std/std",
7480
"sp-trie/std",
75-
"cumulus-primitives-core/std",
76-
]
77-
runtime-benchmarks = [
78-
"kilt-support/runtime-benchmarks",
79-
"pallet-dip-consumer/runtime-benchmarks",
80-
"pallet-dip-provider/runtime-benchmarks"
8181
]
+56-56
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
11
[package]
2-
authors.workspace = true
3-
documentation.workspace = true
4-
edition.workspace = true
5-
homepage.workspace = true
6-
license-file.workspace = true
7-
readme.workspace = true
8-
repository.workspace = true
9-
version.workspace = true
10-
name = "dip-consumer-node-template"
11-
description = "Node template for the KILT Decentralized Identity Provider (DIP) consumer."
12-
build = "build.rs"
2+
authors = { workspace = true }
3+
build = "build.rs"
4+
description = "Node template for the KILT Decentralized Identity Provider (DIP) consumer."
5+
documentation = { workspace = true }
6+
edition = { workspace = true }
7+
homepage = { workspace = true }
8+
license-file = { workspace = true }
9+
name = "dip-consumer-node-template"
10+
readme = { workspace = true }
11+
repository = { workspace = true }
12+
version = { workspace = true }
13+
14+
[build-dependencies]
15+
substrate-build-script-utils = { workspace = true }
1316

1417
[dependencies]
15-
clap = {workspace = true, features = ["std", "derive"]}
16-
futures = { workspace = true }
17-
log = { workspace = true, features = ["std"] }
18-
serde = {workspace = true, features = ["std", "derive"]}
19-
jsonrpsee = {workspace = true, features = ["server"]}
18+
clap = { workspace = true, features = ["derive", "std"] }
19+
futures = { workspace = true }
20+
jsonrpsee = { workspace = true, features = ["server"] }
21+
log = { workspace = true, features = ["std"] }
22+
serde = { workspace = true, features = ["derive", "std"] }
2023

2124
# Internal dependencies
2225
dip-consumer-runtime-template = { workspace = true, features = ["std"] }
2326

2427
# Substrate
25-
frame-benchmarking.workspace = true
26-
frame-benchmarking-cli.workspace = true
27-
pallet-transaction-payment-rpc.workspace = true
28-
sc-basic-authorship.workspace = true
29-
sc-chain-spec.workspace = true
30-
sc-cli.workspace = true
31-
sc-client-api.workspace = true
32-
sc-consensus.workspace = true
33-
sc-executor.workspace = true
34-
sc-network.workspace = true
35-
sc-network-sync.workspace = true
36-
sc-offchain.workspace = true
37-
sc-rpc-api.workspace = true
38-
sc-service.workspace = true
39-
sc-sysinfo.workspace = true
40-
sc-telemetry.workspace = true
41-
sc-tracing.workspace = true
42-
sc-transaction-pool.workspace = true
43-
sc-transaction-pool-api.workspace = true
44-
sp-api = { workspace = true, features = ["std"] }
45-
sp-block-builder = { workspace = true, features = ["std"] }
46-
sp-blockchain.workspace = true
47-
sp-consensus-aura = { workspace = true, features = ["std"] }
48-
sp-core = { workspace = true, features = ["std"] }
49-
sp-keystore = { workspace = true, features = ["std"] }
50-
sp-runtime = { workspace = true, features = ["std"] }
51-
sp-timestamp = { workspace = true, features = ["std"] }
52-
substrate-frame-rpc-system.workspace = true
53-
substrate-prometheus-endpoint.workspace = true
28+
frame-benchmarking = { workspace = true }
29+
frame-benchmarking-cli = { workspace = true }
30+
pallet-transaction-payment-rpc = { workspace = true }
31+
sc-basic-authorship = { workspace = true }
32+
sc-chain-spec = { workspace = true }
33+
sc-cli = { workspace = true }
34+
sc-client-api = { workspace = true }
35+
sc-consensus = { workspace = true }
36+
sc-executor = { workspace = true }
37+
sc-network = { workspace = true }
38+
sc-network-sync = { workspace = true }
39+
sc-offchain = { workspace = true }
40+
sc-rpc-api = { workspace = true }
41+
sc-service = { workspace = true }
42+
sc-sysinfo = { workspace = true }
43+
sc-telemetry = { workspace = true }
44+
sc-tracing = { workspace = true }
45+
sc-transaction-pool = { workspace = true }
46+
sc-transaction-pool-api = { workspace = true }
47+
sp-api = { workspace = true, features = ["std"] }
48+
sp-block-builder = { workspace = true, features = ["std"] }
49+
sp-blockchain = { workspace = true }
50+
sp-consensus-aura = { workspace = true, features = ["std"] }
51+
sp-core = { workspace = true, features = ["std"] }
52+
sp-keystore = { workspace = true, features = ["std"] }
53+
sp-runtime = { workspace = true, features = ["std"] }
54+
sp-timestamp = { workspace = true, features = ["std"] }
55+
substrate-frame-rpc-system = { workspace = true }
56+
substrate-prometheus-endpoint = { workspace = true }
5457

5558
# Polkadot
56-
polkadot-cli.workspace = true
59+
polkadot-cli = { workspace = true }
5760
polkadot-primitives = { workspace = true, features = ["std"] }
5861

5962
# Cumulus
60-
cumulus-client-cli.workspace = true
61-
cumulus-client-consensus-aura.workspace = true
62-
cumulus-client-consensus-common.workspace = true
63-
cumulus-client-service.workspace = true
64-
cumulus-primitives-core = { workspace = true, features = ["std"] }
63+
cumulus-client-cli = { workspace = true }
64+
cumulus-client-consensus-aura = { workspace = true }
65+
cumulus-client-consensus-common = { workspace = true }
66+
cumulus-client-service = { workspace = true }
67+
cumulus-primitives-core = { workspace = true, features = ["std"] }
6568
cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] }
66-
cumulus-relay-chain-interface.workspace = true
67-
68-
[build-dependencies]
69-
substrate-build-script-utils.workspace = true
69+
cumulus-relay-chain-interface = { workspace = true }
7070

7171
[features]
7272
default = []
7373
runtime-benchmarks = [
74-
"frame-benchmarking-cli/runtime-benchmarks",
7574
"dip-consumer-runtime-template/runtime-benchmarks",
75+
"frame-benchmarking-cli/runtime-benchmarks",
7676
]

0 commit comments

Comments
 (0)