Skip to content

Commit

Permalink
Remove taplo, keep toml-sort
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Dec 18, 2023
1 parent 3ef35dd commit 7423b70
Show file tree
Hide file tree
Showing 44 changed files with 493 additions and 475 deletions.
16 changes: 8 additions & 8 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# RUSTFLAGS= cargo clippy
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Dunsafe_code",
"-Dclippy::correctness",
"-Dclippy::complexity",
"-Dclippy::suspicious",
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::identity_op", # E.g. 1 * DOLLARS
"-Dunsafe_code",
"-Dclippy::correctness",
"-Dclippy::complexity",
"-Dclippy::suspicious",
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::identity_op", # E.g. 1 * DOLLARS
]
19 changes: 0 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,6 @@ jobs:
- name: Run zepter
run: zepter run check

toml-formatting:
runs-on: ubuntu-latest
needs: ["set-tags"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.set-tags.outputs.git_ref }}

- name: Setup Rust toolchain
run: rustup show

- name: Install taplo
run: cargo install --locked -f taplo-cli

- name: Run taplo
run: |
taplo format --check --config .cargo/taplo.toml || (echo "Please run `taplo format --config .cargo/taplo.toml` to fix any toml formatting issues" && exit 1)
typescript-formatting:
runs-on: ubuntu-latest
needs: ["set-tags"]
Expand Down
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

reorder_imports = true
max_width = 100
imports_granularity = "One"
imports_granularity = "One"
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
resolver = "2"

[workspace.package]
authors = ["Moondance Labs"]
authors = [ "Moondance Labs" ]
repository = "https://github.com/moondance-labs/tanssi"

[workspace.dependencies]
Expand Down Expand Up @@ -92,7 +92,7 @@ pallet-timestamp = { git = "https://github.com/moondance-labs/polkadot-sdk", bra
pallet-transaction-payment = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false }
pallet-utility = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false }
pallet-tx-pause = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive", "max-encoded-len" ] }
scale-info = { version = "2.10.0", default-features = false }
sp-api = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false }
sp-application-crypto = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false }
Expand Down Expand Up @@ -243,17 +243,17 @@ smallvec = "1.10.0"
# General (client)
async-io = "1.3"
async-trait = "0.1"
clap = { version = "4.1.6", default-features = false, features = ["derive"] }
clap = { version = "4.1.6", default-features = false, features = [ "derive" ] }
core_extensions = "1.5.3"
exit-future = { version = "0.2.0" }
flume = "0.10.9"
futures = { version = "0.3.1" }
futures-timer = "3.0.1"
hex = { version = "0.4.3", default-features = false }
jsonrpsee = { version = "0.16.2", features = ["server"] }
jsonrpsee = { version = "0.16.2", features = [ "server" ] }
num-traits = "0.2.8"
parking_lot = "0.12.1"
rand = { version = "0.8.5", default-features = false, features = ["std_rng"] }
rand = { version = "0.8.5", default-features = false, features = [ "std_rng" ] }
serde_json = { version = "1.0.96", default-features = false }
similar-asserts = "1.1.0"
tempfile = "3.1.0"
Expand Down
8 changes: 4 additions & 4 deletions client/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sc-consensus-manual-seal = { workspace = true }
sc-consensus-slots = { workspace = true }
sc-telemetry = { workspace = true }
sp-api = { workspace = true }
sp-application-crypto = { workspace = true, features = ["full_crypto", "std"] }
sp-application-crypto = { workspace = true, features = [ "full_crypto", "std" ] }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
Expand All @@ -28,7 +28,7 @@ sp-timestamp = { workspace = true }
substrate-prometheus-endpoint = { workspace = true }

# Own
tp-consensus = { workspace = true, features = ["std"] }
tp-consensus = { workspace = true, features = [ "std" ] }

# Cumulus dependencies
cumulus-client-consensus-common = { workspace = true }
Expand All @@ -37,7 +37,7 @@ cumulus-primitives-parachain-inherent = { workspace = true }

# Nimbus Dependencies
nimbus-consensus = { workspace = true }
nimbus-primitives = { workspace = true, features = ["std"] }
nimbus-primitives = { workspace = true, features = [ "std" ] }

# Frontier Dependencies
fc-rpc = { workspace = true }
Expand All @@ -46,7 +46,7 @@ fc-rpc = { workspace = true }
async-trait = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
parity-scale-codec = { workspace = true, features = ["derive"] }
parity-scale-codec = { workspace = true, features = [ "derive" ] }
tracing = { workspace = true }

[dev-dependencies]
Expand Down
9 changes: 6 additions & 3 deletions client/consensus/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>.

#![allow(clippy::await_holding_lock)]

// This tests have been greatly influenced by
// https://github.com/paritytech/substrate/blob/master/client/consensus/aura/src/lib.rs#L832
// Most of the items hereby added are intended to make it work with our current consensus mechanism
Expand Down Expand Up @@ -212,7 +210,12 @@ impl Proposer<TestBlock> for DummyProposer {
_: Duration,
_: Option<usize>,
) -> Self::Proposal {
let r = self.1.new_block(digests).unwrap().build();
let r = self
.1
.new_block(digests)
.unwrap()
.build()
.map_err(|e| e.into());

futures::future::ready(r.map(|b| Proposal {
block: b.block,
Expand Down
10 changes: 5 additions & 5 deletions client/manual-xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ version = "0.1.0"

[dependencies]
flume = { workspace = true }
futures = { workspace = true, features = ["compat"] }
futures = { workspace = true, features = [ "compat" ] }
hex-literal = { workspace = true }
jsonrpsee = { workspace = true, features = ["macros", "server"] }
parity-scale-codec = { workspace = true, features = ["std"] }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
parity-scale-codec = { workspace = true, features = [ "std" ] }
staging-xcm = { workspace = true }
tokio = { workspace = true, features = ["sync", "time"] }
tokio = { workspace = true, features = [ "sync", "time" ] }

cumulus-primitives-core = { workspace = true, features = ["std"] }
cumulus-primitives-core = { workspace = true, features = [ "std" ] }
28 changes: 14 additions & 14 deletions client/node-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ version = "0.1.0"
[dependencies]
async-io = { workspace = true }
async-trait = { workspace = true }
clap = { workspace = true, features = ["derive"] }
core_extensions = { workspace = true, features = ["type_identity"] }
clap = { workspace = true, features = [ "derive" ] }
core_extensions = { workspace = true, features = [ "type_identity" ] }
flume = { workspace = true }
futures = { workspace = true }
jsonrpsee = { workspace = true, features = ["server"] }
jsonrpsee = { workspace = true, features = [ "server" ] }
log = { workspace = true }
parity-scale-codec = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = [ "derive" ] }

# Local
tc-consensus = { workspace = true }

# Nimbus
nimbus-consensus = { workspace = true }
nimbus-primitives = { workspace = true, features = ["std"] }
nimbus-primitives = { workspace = true, features = [ "std" ] }

# Substrate
frame-benchmarking = { workspace = true }
Expand All @@ -48,19 +48,19 @@ sc-tracing = { workspace = true }
sc-transaction-pool = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sc-utils = { workspace = true }
sp-api = { workspace = true, features = ["std"] }
sp-api = { workspace = true, features = [ "std" ] }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-inherents = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true, features = ["std"] }
sp-offchain = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }
sp-session = { workspace = true, features = ["std"] }
sp-timestamp = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = [ "std" ] }
sp-inherents = { workspace = true, features = [ "std" ] }
sp-io = { workspace = true, features = [ "std" ] }
sp-keystore = { workspace = true, features = [ "std" ] }
sp-offchain = { workspace = true, features = [ "std" ] }
sp-runtime = { workspace = true, features = [ "std" ] }
sp-session = { workspace = true, features = [ "std" ] }
sp-timestamp = { workspace = true, features = [ "std" ] }

sp-transaction-pool = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
Expand Down
52 changes: 26 additions & 26 deletions container-chains/templates/frontier/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ version = "0.1.0"
[dependencies]
async-io = { workspace = true }
async-trait = { workspace = true }
clap = { workspace = true, features = ["derive"] }
clap = { workspace = true, features = [ "derive" ] }
flume = { workspace = true }
futures = { workspace = true }
hex-literal = { workspace = true }
jsonrpsee = { workspace = true, features = ["server"] }
jsonrpsee = { workspace = true, features = [ "server" ] }
log = { workspace = true }
parity-scale-codec = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = [ "derive" ] }
url = { workspace = true }

# Local
ccp-authorities-noting-inherent = { workspace = true }
container-chain-template-frontier-runtime = { workspace = true, features = ["std"] }
container-chain-template-frontier-runtime = { workspace = true, features = [ "std" ] }
manual-xcm-rpc = { workspace = true }
node-common = { workspace = true }
tc-consensus = { workspace = true }

# Nimbus
nimbus-consensus = { workspace = true }
nimbus-primitives = { workspace = true, features = ["std"] }
nimbus-primitives = { workspace = true, features = [ "std" ] }

# Substrate
frame-benchmarking = { workspace = true }
frame-benchmarking-cli = { workspace = true }
frame-system-rpc-runtime-api = { workspace = true }
pallet-transaction-payment-rpc = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = ["std"] }
pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = [ "std" ] }
sc-basic-authorship = { workspace = true }
sc-chain-spec = { workspace = true }
sc-cli = { workspace = true }
Expand All @@ -55,21 +55,21 @@ sc-telemetry = { workspace = true }
sc-tracing = { workspace = true }
sc-transaction-pool = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sp-api = { workspace = true, features = ["std"] }
sp-api = { workspace = true, features = [ "std" ] }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
sp-debug-derive = { workspace = true }

sp-consensus-aura = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-inherents = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true, features = ["std"] }
sp-offchain = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }
sp-session = { workspace = true, features = ["std"] }
sp-timestamp = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = [ "std" ] }
sp-inherents = { workspace = true, features = [ "std" ] }
sp-io = { workspace = true, features = [ "std" ] }
sp-keystore = { workspace = true, features = [ "std" ] }
sp-offchain = { workspace = true, features = [ "std" ] }
sp-runtime = { workspace = true, features = [ "std" ] }
sp-session = { workspace = true, features = [ "std" ] }
sp-timestamp = { workspace = true, features = [ "std" ] }

sp-transaction-pool = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
Expand All @@ -96,10 +96,10 @@ cumulus-test-relay-sproof-builder = { workspace = true }
fc-api = { workspace = true }
fc-cli = { workspace = true }
fc-consensus = { workspace = true }
fc-db = { workspace = true, features = ["sql"] }
fc-mapping-sync = { workspace = true, features = ["sql"] }
fc-rpc = { workspace = true, features = ["txpool"] }
fc-rpc-core = { workspace = true, features = ["txpool"] }
fc-db = { workspace = true, features = [ "sql" ] }
fc-mapping-sync = { workspace = true, features = [ "sql" ] }
fc-rpc = { workspace = true, features = [ "txpool" ] }
fc-rpc-core = { workspace = true, features = [ "txpool" ] }
fc-storage = { workspace = true }
fp-evm = { workspace = true }
fp-rpc = { workspace = true }
Expand All @@ -111,22 +111,22 @@ substrate-build-script-utils = { workspace = true }
default = []
runtime-benchmarks = [
"container-chain-template-frontier-runtime/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"nimbus-primitives/runtime-benchmarks",
"pallet-ethereum/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"nimbus-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-runtime/runtime-benchmarks"
]
try-runtime = [
"container-chain-template-frontier-runtime/try-runtime",
"try-runtime-cli/try-runtime",
"nimbus-primitives/try-runtime",
"pallet-ethereum/try-runtime",
"polkadot-cli/try-runtime",
"polkadot-service/try-runtime",
"sp-runtime/try-runtime",
"try-runtime-cli/try-runtime",
]
"sp-runtime/try-runtime"
]
Loading

0 comments on commit 7423b70

Please sign in to comment.