From f283a2d99a2e9a2a537f738a98cf35b0c73649a8 Mon Sep 17 00:00:00 2001 From: Toufeeq Pasha Date: Tue, 26 Sep 2023 14:24:56 +0530 Subject: [PATCH 1/2] formatted toml features with zepter --- core/Cargo.toml | 39 ++++++++++++++++---------------------- kate/Cargo.toml | 37 ++++++++++++++++-------------------- kate/recovery/Cargo.toml | 16 +++++++--------- nomad/base/Cargo.toml | 14 ++++++-------- nomad/core/Cargo.toml | 12 +++++------- nomad/merkle/Cargo.toml | 8 ++++---- nomad/signature/Cargo.toml | 14 ++++++-------- 7 files changed, 60 insertions(+), 80 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 9fdff3d5..9a7586f7 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -36,40 +36,33 @@ serde_json = "1" test-case = "1.2.3" [features] -default = ["std"] +default = [ "std" ] std = [ - "serde/std", - "hex", + "binary-merkle-tree?/std", "codec/std", - "scale-info/std", + "derive_more/display", + "frame-support?/std", + "hash256-std-hasher/std", + "hex", "log/std", + "scale-info/std", + "serde/std", + "sp-arithmetic/std", "sp-core/std", "sp-io/std", - "sp-std/std", - "sp-trie/std", - "sp-arithmetic/std", - "hash256-std-hasher/std", - "binary-merkle-tree?/std", - "derive_more/display", "sp-runtime-interface?/std", "sp-runtime?/std", - "frame-support?/std", + "sp-std/std", + "sp-trie/std", ] runtime = [ + "binary-merkle-tree", + "frame-support", "serde", - "sp-runtime-interface", "sp-runtime", - "frame-support", - "binary-merkle-tree", + "sp-runtime-interface", ] header-backward-compatibility-test = [] -try-runtime = [ - "runtime", - "sp-runtime/try-runtime", -] -serde = [ - "dep:serde", - "hex/serde", - "log/serde", -] +try-runtime = [ "runtime", "sp-runtime/try-runtime" ] +serde = [ "dep:serde", "hex/serde", "log/serde" ] diff --git a/kate/Cargo.toml b/kate/Cargo.toml index ccb981de..c45e0187 100644 --- a/kate/Cargo.toml +++ b/kate/Cargo.toml @@ -46,37 +46,32 @@ serde_json = "1" test-case = "1.2.3" [features] -default = ["std"] -alloc = ["dusk-plonk/alloc", "nalgebra/alloc"] -parallel = [ - "rayon", - "criterion/rayon", -] +default = [ "std" ] +alloc = [ "dusk-plonk/alloc", "nalgebra/alloc" ] +parallel = [ "criterion/rayon", "rayon" ] std = [ - "parallel", + "avail-core/std", + "codec/std", + "dusk-bytes", + "dusk-plonk/std", + "hex", + "hex-literal", "kate-recovery/std", + "log", + "nalgebra/std", "once_cell", - "hex-literal", - "hex", - "codec/std", + "parallel", + "poly-multiproof/blst", + "rand/std", + "rand_chacha/std", "serde", "serde_json", - "rand_chacha/std", - "rand/std", - "log", - "dusk-plonk/std", - "dusk-bytes", - "avail-core/std", "sp-arithmetic/std", "sp-core/std", - "poly-multiproof/blst", - "nalgebra/std", ] -serde = [ - "dep:serde", -] +serde = [ "dep:serde" ] extended-columns = [] maximum-block-size = [] diff --git a/kate/recovery/Cargo.toml b/kate/recovery/Cargo.toml index 1ff68a66..1a901de6 100644 --- a/kate/recovery/Cargo.toml +++ b/kate/recovery/Cargo.toml @@ -31,19 +31,17 @@ hex = "0.4" test-case = "1.2.3" [features] -default = ["std"] +default = [ "std" ] std = [ + "avail-core/std", + "dusk-bytes", + "dusk-plonk/std", "once_cell", + "rand/std", + "rand_chacha/std", "serde", "sp-arithmetic/std", "sp-std/std", - "avail-core/std", - "rand/std", - "rand_chacha/std", - "dusk-bytes", - "dusk-plonk/std", ] -serde = [ - "dep:serde", -] +serde = [ "dep:serde" ] diff --git a/nomad/base/Cargo.toml b/nomad/base/Cargo.toml index 2a527edd..75c6e278 100644 --- a/nomad/base/Cargo.toml +++ b/nomad/base/Cargo.toml @@ -25,18 +25,16 @@ once_cell = { version = "1.8.0", optional = true } serde = { version = "1.0.188", default-features = false, features = ["derive"], optional = true } [features] -default = ["std"] +default = [ "std" ] std = [ - "serde", - "ethers-signers", - "once_cell", "codec/std", + "ethers-signers", + "nomad-core/std", "nomad-signature/std", + "once_cell", "scale-info/std", - "nomad-core/std", + "serde", "sp-core/std", "sp-runtime/std", ] -serde = [ - "dep:serde", -] +serde = [ "dep:serde" ] diff --git a/nomad/core/Cargo.toml b/nomad/core/Cargo.toml index be166394..a1f9dbee 100644 --- a/nomad/core/Cargo.toml +++ b/nomad/core/Cargo.toml @@ -29,19 +29,17 @@ tiny-keccak = { version = "2.0.2", default-features = false, features = ["keccak async-trait = "0.1.42" [features] -default = ["std"] +default = [ "std" ] std = [ - "serde", + "codec/std", "ethers-core", "ethers-signers", - "primitive-types/serde", "nomad-signature/std", - "codec/std", + "primitive-types/serde", "scale-info/std", + "serde", "sp-runtime/std", "sp-std/std", ] -serde = [ - "dep:serde", -] +serde = [ "dep:serde" ] runtime-benchmarks = [] diff --git a/nomad/merkle/Cargo.toml b/nomad/merkle/Cargo.toml index 575b1c2a..f7a63ce9 100644 --- a/nomad/merkle/Cargo.toml +++ b/nomad/merkle/Cargo.toml @@ -35,13 +35,13 @@ optional = true features = ["derive"] [features] -default = ["std"] +default = [ "std" ] std = [ - "serde", - "nomad-core/std", "avail-core/std", "codec/std", + "frame-support/std", + "nomad-core/std", "scale-info/std", + "serde", "sp-core/std", - "frame-support/std", ] diff --git a/nomad/signature/Cargo.toml b/nomad/signature/Cargo.toml index 4c94438b..129f8189 100644 --- a/nomad/signature/Cargo.toml +++ b/nomad/signature/Cargo.toml @@ -40,17 +40,15 @@ tiny-keccak = { version = "2.0.2", default-features = false, features = ["keccak byte-slice-cast = "1.2.1" [features] -default = ["std"] +default = [ "std" ] std = [ - "serde", + "codec/std", + "ethers-core", + "frame-support/std", "hex/std", "scale-info/std", - "codec/std", + "serde", "sp-core/std", "sp-runtime/std", - "frame-support/std", - "ethers-core", -] -serde = [ - "dep:serde", ] +serde = [ "dep:serde" ] From dfce4123b379884d76d171ce35f0fdf619a670a6 Mon Sep 17 00:00:00 2001 From: Toufeeq Pasha Date: Tue, 26 Sep 2023 14:55:53 +0530 Subject: [PATCH 2/2] updated CI to use zepter for toml formatting check --- .github/workflows/default.yml | 6 ++++-- dprint.json | 20 -------------------- 2 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 dprint.json diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 3417eec6..ef55d9e6 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -38,8 +38,10 @@ jobs: default: true profile: minimal - - name: Check `TOML`, `JSON`, and `MarkDown` formatting - uses: dprint/check@v2.1 + - name: Check TOML formatting + run: | + cargo install zepter --locked --version 0.11.0 -q -f --no-default-features && zepter --version + zepter format features --check - name: Check code formatting uses: actions-rs/cargo@v1 diff --git a/dprint.json b/dprint.json deleted file mode 100644 index b3f80c3c..00000000 --- a/dprint.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "incremental": true, - "useTabs": true, - "json": { - }, - "markdown": { - }, - "toml": { - }, - "includes": ["**/*.{json,md,toml}"], - "excludes": [ - "**/*-lock.json", - "**/target" - ], - "plugins": [ - "https://plugins.dprint.dev/json-0.15.6.wasm", - "https://plugins.dprint.dev/markdown-0.14.1.wasm", - "https://plugins.dprint.dev/toml-0.5.4.wasm" - ] -}