Skip to content

Commit

Permalink
fix: introduce taplo.toml and sort Cargo.toml (#2096)
Browse files Browse the repository at this point in the history
* fix: add taplo.toml

* fix: introduce taplo.toml & sort cargo.toml

* chore: remove option in ci too
  • Loading branch information
shuiyisong authored Aug 4, 2023
1 parent 93cd4ab commit 7efff2d
Show file tree
Hide file tree
Showing 34 changed files with 114 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Install taplo
run: cargo install taplo-cli --version ^0.8 --locked
- name: Run taplo
run: taplo format --check --option "indent_string= "
run: taplo format --check

# Use coverage to run test.
# test:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ fmt: ## Format all the Rust code.

.PHONY: fmt-toml
fmt-toml: ## Format all TOML files.
taplo format --option "indent_string= "
taplo format

.PHONY: check-toml
check-toml: ## Check all TOML files.
taplo format --check --option "indent_string= "
taplo format --check

.PHONY: docker-image
docker-image: multi-platform-buildx ## Build docker image.
Expand Down
2 changes: 1 addition & 1 deletion src/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ tokio.workspace = true

[dev-dependencies]
catalog = { path = ".", features = ["testing"] }
common-test-util = { path = "../common/test-util" }
chrono.workspace = true
common-test-util = { path = "../common/test-util" }
log-store = { path = "../log-store" }
mito = { path = "../mito", features = ["test"] }
object-store = { path = "../object-store" }
Expand Down
6 changes: 3 additions & 3 deletions src/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ common-base = { path = "../common/base" }
common-catalog = { path = "../common/catalog" }
common-error = { path = "../common/error" }
common-grpc = { path = "../common/grpc" }
common-meta = { path = "../common/meta" }
common-query = { path = "../common/query" }
common-recordbatch = { path = "../common/recordbatch" }
common-time = { path = "../common/time" }
common-meta = { path = "../common/meta" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
datafusion.workspace = true
datatypes = { path = "../datatypes" }
enum_dispatch = "0.3"
Expand All @@ -37,10 +37,10 @@ tonic.workspace = true
common-grpc-expr = { path = "../common/grpc-expr" }
datanode = { path = "../datanode" }
derive-new = "0.5"
prost.workspace = true
substrait = { path = "../common/substrait" }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
prost.workspace = true

[dev-dependencies.substrait_proto]
package = "substrait"
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ clap = { version = "3.1", features = ["derive"] }
client = { path = "../client" }
common-base = { path = "../common/base" }
common-error = { path = "../common/error" }
common-query = { path = "../common/query" }
common-meta = { path = "../common/meta" }
common-query = { path = "../common/query" }
common-recordbatch = { path = "../common/recordbatch" }
common-telemetry = { path = "../common/telemetry", features = [
"deadlock_detection",
Expand Down Expand Up @@ -60,8 +60,8 @@ tokio.workspace = true
[dev-dependencies]
common-test-util = { path = "../common/test-util" }
rexpect = "0.5"
temp-env = "0.3"
serde.workspace = true
temp-env = "0.3"
toml.workspace = true

[build-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/common/datasource/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition.workspace = true
license.workspace = true

[dependencies]
arrow.workspace = true
arrow-schema.workspace = true
arrow.workspace = true
async-compression = { version = "0.3", features = [
"bzip2",
"gzip",
Expand All @@ -24,12 +24,12 @@ derive_builder.workspace = true
futures.workspace = true
object-store = { path = "../../object-store" }
orc-rust = "0.2"
paste = "1.0"
regex = "1.7"
snafu.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tokio.workspace = true
url = "2.3"
paste = "1.0"

[dev-dependencies]
common-test-util = { path = "../test-util" }
4 changes: 2 additions & 2 deletions src/common/function-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ license.workspace = true
proc-macro = true

[dependencies]
common-telemetry = { path = "../telemetry" }
backtrace = "0.3"
common-telemetry = { path = "../telemetry" }
proc-macro2 = "1.0"
quote = "1.0"
syn = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
arc-swap = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions src/common/greptimedb-telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ async-trait.workspace = true
common-error = { path = "../error" }
common-runtime = { path = "../runtime" }
common-telemetry = { path = "../telemetry" }
once_cell = "1.17.0"
reqwest = { version = "0.11", features = [
"json",
"rustls-tls",
Expand All @@ -17,11 +18,10 @@ serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
uuid.workspace = true
once_cell = "1.17.0"

[dev-dependencies]
hyper = { version = "0.14", features = ["full"] }
common-test-util = { path = "../test-util" }
hyper = { version = "0.14", features = ["full"] }

[build-dependencies]
common-version = { path = "../version" }
2 changes: 1 addition & 1 deletion src/common/mem-prof/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ tikv-jemalloc-ctl = { version = "0.5", features = ["use_std"] }
tokio.workspace = true

[dependencies.tikv-jemalloc-sys]
version = "0.5"
features = ["stats", "profiling", "unprefixed_malloc_on_supported_platforms"]
version = "0.5"
2 changes: 1 addition & 1 deletion src/common/procedure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition.workspace = true
license.workspace = true

[dependencies]
async-trait.workspace = true
async-stream.workspace = true
async-trait.workspace = true
backon = "0.4"
common-error = { path = "../error" }
common-runtime = { path = "../runtime" }
Expand Down
2 changes: 1 addition & 1 deletion src/common/query/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ async-trait.workspace = true
common-error = { path = "../error" }
common-recordbatch = { path = "../recordbatch" }
common-time = { path = "../time" }
datafusion.workspace = true
datafusion-common.workspace = true
datafusion-expr.workspace = true
datafusion.workspace = true
datatypes = { path = "../../datatypes" }
serde.workspace = true
snafu.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion src/common/recordbatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ license.workspace = true

[dependencies]
common-error = { path = "../error" }
datafusion.workspace = true
datafusion-common.workspace = true
datafusion.workspace = true
datatypes = { path = "../../datatypes" }
futures.workspace = true
paste = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/common/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ metrics.workspace = true
once_cell.workspace = true
paste.workspace = true
snafu.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tokio.workspace = true

[dev-dependencies]
tokio-test = "0.4"
2 changes: 1 addition & 1 deletion src/common/substrait/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ catalog = { path = "../../catalog" }
common-catalog = { path = "../catalog" }
common-error = { path = "../error" }
common-telemetry = { path = "../telemetry" }
datafusion.workspace = true
datafusion-common.workspace = true
datafusion-expr.workspace = true
datafusion-substrait.workspace = true
datafusion.workspace = true
datatypes = { path = "../../datatypes" }
futures = "0.3"
promql = { path = "../../promql" }
Expand Down
2 changes: 1 addition & 1 deletion src/common/time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ license.workspace = true

[dependencies]
arrow.workspace = true
chrono.workspace = true
chrono-tz = "0.8"
chrono.workspace = true
common-error = { path = "../error" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
16 changes: 8 additions & 8 deletions src/datanode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ license.workspace = true
greptimedb-telemetry = []

[dependencies]
api = { path = "../api" }
async-compat = "0.2"
async-stream.workspace = true
async-trait.workspace = true
api = { path = "../api" }
axum = "0.6"
axum-macros = "0.3"
catalog = { path = "../catalog" }
common-base = { path = "../common/base" }
common-catalog = { path = "../common/catalog" }
common-error = { path = "../common/error" }
common-datasource = { path = "../common/datasource" }
common-error = { path = "../common/error" }
common-function = { path = "../common/function" }
common-greptimedb-telemetry = { path = "../common/greptimedb-telemetry" }
common-grpc = { path = "../common/grpc" }
common-grpc-expr = { path = "../common/grpc-expr" }
common-meta = { path = "../common/meta" }
Expand All @@ -29,17 +30,16 @@ common-recordbatch = { path = "../common/recordbatch" }
common-runtime = { path = "../common/runtime" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
common-greptimedb-telemetry = { path = "../common/greptimedb-telemetry" }
datafusion.workspace = true
datafusion-common.workspace = true
datafusion-expr.workspace = true
datafusion.workspace = true
datatypes = { path = "../datatypes" }
file-table-engine = { path = "../file-table-engine" }
futures = "0.3"
futures-util.workspace = true
key-lock = "0.1"
hyper = { version = "0.14", features = ["full"] }
humantime-serde = "1.1"
hyper = { version = "0.14", features = ["full"] }
key-lock = "0.1"
log-store = { path = "../log-store" }
meta-client = { path = "../meta-client" }
meta-srv = { path = "../meta-srv", features = ["mock"] }
Expand All @@ -61,8 +61,8 @@ store-api = { path = "../store-api" }
substrait = { path = "../common/substrait" }
table = { path = "../table" }
table-procedure = { path = "../table-procedure" }
tokio.workspace = true
tokio-stream = { version = "0.1", features = ["net"] }
tokio.workspace = true
toml.workspace = true
tonic.workspace = true
tower = { version = "0.4", features = ["full"] }
Expand All @@ -73,7 +73,7 @@ uuid.workspace = true
[dev-dependencies]
axum-test-helper = { git = "https://github.com/sunng87/axum-test-helper.git", branch = "patch-1" }
client = { path = "../client" }
common-test-util = { path = "../common/test-util" }
common-query = { path = "../common/query" }
common-test-util = { path = "../common/test-util" }
datafusion-common.workspace = true
session = { path = "../session", features = ["testing"] }
4 changes: 2 additions & 2 deletions src/datatypes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ default = []
test = []

[dependencies]
arrow.workspace = true
arrow-array.workspace = true
arrow-schema.workspace = true
arrow.workspace = true
common-base = { path = "../common/base" }
common-error = { path = "../common/error" }
common-time = { path = "../common/time" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
datafusion-common.workspace = true
enum_dispatch = "0.3"
num = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/file-table-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ common-procedure = { path = "../common/procedure" }
common-query = { path = "../common/query" }
common-recordbatch = { path = "../common/recordbatch" }
common-telemetry = { path = "../common/telemetry" }
common-test-util = { path = "../common/test-util", optional = true }
common-time = { path = "../common/time" }
datafusion.workspace = true
datatypes = { path = "../datatypes" }
Expand All @@ -27,7 +28,6 @@ serde_json = "1.0"
snafu.workspace = true
store-api = { path = "../store-api" }
table = { path = "../table" }
common-test-util = { path = "../common/test-util", optional = true }
tokio.workspace = true

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ common-error = { path = "../common/error" }
common-function = { path = "../common/function" }
common-grpc = { path = "../common/grpc" }
common-grpc-expr = { path = "../common/grpc-expr" }
common-query = { path = "../common/query" }
common-meta = { path = "../common/meta" }
common-query = { path = "../common/query" }
common-recordbatch = { path = "../common/recordbatch" }
common-runtime = { path = "../common/runtime" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
datafusion.workspace = true
datafusion-common.workspace = true
datafusion-expr.workspace = true
datafusion.workspace = true
datanode = { path = "../datanode" }
datatypes = { path = "../datatypes" }
file-table-engine = { path = "../file-table-engine" }
Expand Down
4 changes: 2 additions & 2 deletions src/log-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ common-base = { path = "../common/base" }
common-error = { path = "../common/error" }
common-runtime = { path = "../common/runtime" }
common-telemetry = { path = "../common/telemetry" }
futures.workspace = true
futures-util.workspace = true
futures.workspace = true
protobuf = { version = "2", features = ["bytes"] }
raft-engine = "0.3"
snafu = { version = "0.7", features = ["backtraces"] }
store-api = { path = "../store-api" }
tokio.workspace = true
tokio-util.workspace = true
tokio.workspace = true

[dev-dependencies]
common-test-util = { path = "../common/test-util" }
Expand Down
4 changes: 2 additions & 2 deletions src/meta-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ async-trait = "0.1"
chrono.workspace = true
common-error = { path = "../common/error" }
common-grpc = { path = "../common/grpc" }
common-telemetry = { path = "../common/telemetry" }
common-meta = { path = "../common/meta" }
common-telemetry = { path = "../common/telemetry" }
etcd-client.workspace = true
rand.workspace = true
serde.workspace = true
serde_json.workspace = true
snafu.workspace = true
table = { path = "../table" }
tokio.workspace = true
tokio-stream = { version = "0.1", features = ["net"] }
tokio.workspace = true
tonic.workspace = true

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/meta-srv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ client = { path = "../client" }
common-base = { path = "../common/base" }
common-catalog = { path = "../common/catalog" }
common-error = { path = "../common/error" }
common-greptimedb-telemetry = { path = "../common/greptimedb-telemetry" }
common-grpc = { path = "../common/grpc" }
common-grpc-expr = { path = "../common/grpc-expr" }
common-meta = { path = "../common/meta" }
common-procedure = { path = "../common/procedure" }
common-runtime = { path = "../common/runtime" }
common-telemetry = { path = "../common/telemetry" }
common-time = { path = "../common/time" }
common-greptimedb-telemetry = { path = "../common/greptimedb-telemetry" }
dashmap = "5.4"
datatypes = { path = "../datatypes" }
derive_builder.workspace = true
Expand All @@ -42,17 +42,17 @@ rand.workspace = true
regex.workspace = true
serde = "1.0"
serde_json = "1.0"
servers = { path = "../servers" }
snafu.workspace = true
store-api = { path = "../store-api" }
table = { path = "../table" }
tokio.workspace = true
tokio-stream = { version = "0.1", features = ["net"] }
tokio.workspace = true
toml.workspace = true
tonic.workspace = true
tower = "0.4"
typetag = "0.2"
url = "2.3"
servers = { path = "../servers" }
uuid.workspace = true

[dev-dependencies]
Expand Down
Loading

0 comments on commit 7efff2d

Please sign in to comment.