From aa6e6d37aada2ac36aa8f8ed24fb91d1b778d954 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 6 Jan 2022 17:08:35 +0200 Subject: [PATCH 1/3] ci: turn on some taplo rules to format Cargo.toml --- Cargo.toml | 4 ++-- src/engine/hash/Cargo.toml | 6 +++--- src/journal/Cargo.toml | 4 ++-- src/kernel/Cargo.toml | 6 +++--- src/storage/Cargo.toml | 6 +++--- taplo.toml | 13 +++++++++++++ 6 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 taplo.toml diff --git a/Cargo.toml b/Cargo.toml index 887c2f7f..8cdcca20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,9 @@ description = "A serverless storage engine that empowers engineers to build reli members = ["src/engine/luna", "src/journal", "src/storage", "src/futures"] [dependencies] -luna-engine = { version = "0.3.0", path = "src/engine/luna" } +engula-futures = { version = "0.3.0", path = "src/futures" } engula-journal = { version = "0.3.0", path = "src/journal" } engula-storage = { version = "0.3.0", path = "src/storage" } -engula-futures = { version = "0.3.0", path = "src/futures" } +luna-engine = { version = "0.3.0", path = "src/engine/luna" } tokio = { version = "1", features = ["full"] } diff --git a/src/engine/hash/Cargo.toml b/src/engine/hash/Cargo.toml index 9fee3e86..254dff20 100644 --- a/src/engine/hash/Cargo.toml +++ b/src/engine/hash/Cargo.toml @@ -8,11 +8,11 @@ repository = "https://github.com/engula/engula" description = "An Engula engine that provides simple key-value storage." [dependencies] -engula-kernel = { version = "0.3.0", path = "../../kernel" } engula-journal = { version = "0.3.0", path = "../../journal" } +engula-kernel = { version = "0.3.0", path = "../../kernel" } engula-storage = { version = "0.3.0", path = "../../storage" } -thiserror = "1.0" -tokio = { version = "1.14", features = ["full"] } bytes = "1.1" futures = "0.3" +thiserror = "1.0" +tokio = { version = "1.14", features = ["full"] } diff --git a/src/journal/Cargo.toml b/src/journal/Cargo.toml index 8b7bb499..8225e897 100644 --- a/src/journal/Cargo.toml +++ b/src/journal/Cargo.toml @@ -10,10 +10,10 @@ description = "An Engula module that provides stream storage abstractions and im [dependencies] engula-futures = { version = "0.3.0", path = "../futures" } -thiserror = "1.0" async-trait = "0.1" -tokio = { version = "1.13", features = ["full"] } prost = "0.9" +thiserror = "1.0" +tokio = { version = "1.13", features = ["full"] } [dev-dependencies] tempfile = "3" diff --git a/src/kernel/Cargo.toml b/src/kernel/Cargo.toml index 653dde51..78b724e0 100644 --- a/src/kernel/Cargo.toml +++ b/src/kernel/Cargo.toml @@ -8,17 +8,17 @@ repository = "https://github.com/engula/engula" description = "An Engula module that provides stateful environment abstractions and implementations." [dependencies] +engula-futures = { version = "0.3.0", path = "../futures" } engula-journal = { version = "0.3.0", path = "../journal" } engula-storage = { version = "0.3.0", path = "../storage" } -engula-futures = { version = "0.3.0", path = "../futures" } -thiserror = "1.0" async-trait = "0.1" futures = "0.3" +prost = "0.9" +thiserror = "1.0" tokio = { version = "1.14", features = ["full"] } tokio-stream = { version = "0.1", features = ["sync"] } tonic = "0.6" -prost = "0.9" [dev-dependencies] tempfile = "3" diff --git a/src/storage/Cargo.toml b/src/storage/Cargo.toml index b333948c..9252713d 100644 --- a/src/storage/Cargo.toml +++ b/src/storage/Cargo.toml @@ -10,12 +10,12 @@ description = "An Engula module that provides object storage abstractions and im [dependencies] engula-futures = { version = "0.3.0", path = "../futures" } -thiserror = "1.0" async-trait = "0.1" bytes = "1.1.0" -tokio = { version = "1.13", features = ["full"] } -prost = "0.9" futures = "0.3" +prost = "0.9" +thiserror = "1.0" +tokio = { version = "1.13", features = ["full"] } [dev-dependencies] tempfile = "3" diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 00000000..66382bef --- /dev/null +++ b/taplo.toml @@ -0,0 +1,13 @@ +include = ["**/Cargo.toml"] + +[formatting] +array_auto_collapse = true +array_auto_expand = true +reorder_keys = true + +# Do not sort key names within [package] section. +[[rule]] +keys = ["package"] + +[rule.formatting] +reorder_keys = false From 948f4a4a6ec99176b08ced3ae0b17b8cd6696759 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 6 Jan 2022 17:30:46 +0200 Subject: [PATCH 2/3] ignore license auditing for taplo config file --- tools/ci/licenserc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci/licenserc.yml b/tools/ci/licenserc.yml index 8696b5b4..0bde44ce 100644 --- a/tools/ci/licenserc.yml +++ b/tools/ci/licenserc.yml @@ -26,3 +26,4 @@ header: - 'rust-toolchain.toml' - 'rustfmt.toml' - '.cargo/audit.toml' + - 'taplo.toml' From 6b4b56752eda71bf2bcfe4abd19cdc271d28372b Mon Sep 17 00:00:00 2001 From: xxchan <37948597+xxchan@users.noreply.github.com> Date: Fri, 7 Jan 2022 08:25:22 +0200 Subject: [PATCH 3/3] Update taplo.toml Co-authored-by: Richard --- taplo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/taplo.toml b/taplo.toml index 66382bef..98ab3517 100644 --- a/taplo.toml +++ b/taplo.toml @@ -1,8 +1,6 @@ include = ["**/Cargo.toml"] [formatting] -array_auto_collapse = true -array_auto_expand = true reorder_keys = true # Do not sort key names within [package] section.