Skip to content

Commit

Permalink
Replace cargo-sort with taplo (#3409)
Browse files Browse the repository at this point in the history
Format checked toml files to pass lint (#3409)
  • Loading branch information
wellcast committed Feb 25, 2025
1 parent cffcecc commit 851321a
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 101 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,18 @@ jobs:
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-sort
- name: Install taplo-sort
run: |
RUSTFLAGS='' cargo install cargo-sort --git https://github.com/Twey/cargo-sort/ --tag linera
RUSTFLAGS='' cargo install taplo-cli --locked
- name: Check if Cargo.toml files are sorted
run: |
cargo sort --check --workspace --grouped
taplo fmt --check
- name: Check if example Cargo.toml files are sorted
run: |
cd examples
cargo sort --check --workspace --grouped
taplo fmt --check
cd agent
cargo sort --check
taplo fmt --check
lint-check-for-outdated-readme:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include = ["Cargo.toml"]

[formatting]
reorder_keys = false

[[rule]]
include = ["Cargo.toml"]
keys = ["workspace.dependencies"]

[rule.formatting]
reorder_keys = true
155 changes: 82 additions & 73 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[workspace]
members = [
"linera-base",
"linera-chain",
"linera-client",
"linera-core",
"linera-ethereum",
"linera-execution",
"linera-explorer",
"linera-faucet",
"linera-faucet/client",
"linera-faucet/server",
"linera-indexer/example",
"linera-indexer/graphql-client",
"linera-indexer/lib",
"linera-indexer/plugins",
"linera-rpc",
"linera-sdk",
"linera-sdk-derive",
"linera-service",
"linera-service-graphql-client",
"linera-storage",
"linera-storage-service",
"linera-summary",
"linera-views",
"linera-views-derive",
"linera-witty",
"linera-witty-macros",
"linera-witty/test-modules",
"linera-base",
"linera-chain",
"linera-client",
"linera-core",
"linera-ethereum",
"linera-execution",
"linera-explorer",
"linera-faucet",
"linera-faucet/client",
"linera-faucet/server",
"linera-indexer/example",
"linera-indexer/graphql-client",
"linera-indexer/lib",
"linera-indexer/plugins",
"linera-rpc",
"linera-sdk",
"linera-sdk-derive",
"linera-service",
"linera-service-graphql-client",
"linera-storage",
"linera-storage-service",
"linera-summary",
"linera-views",
"linera-views-derive",
"linera-witty",
"linera-witty-macros",
"linera-witty/test-modules",
]
exclude = ["examples", "scripts"]
resolver = "2"
Expand All @@ -40,7 +40,12 @@ license = "Apache-2.0"
edition = "2021"

[workspace.dependencies]
heck = "0.4.1"
alloy = { version = "0.9.2", default-features = false }
alloy-primitives = { version = "0.8.18", default-features = false, features = [
"serde",
] }
alloy-signer-local = "0.9.2"
alloy-sol-types = "0.8.18"
anyhow = "1.0.80"
assert_matches = "1.5.0"
async-graphql = "=7.0.2"
Expand Down Expand Up @@ -75,10 +80,10 @@ derive_more = "1.0.0"
dirs = "5.0.1"
dyn-clone = "1.0.17"
ed25519-dalek = { version = "2.1.1", default-features = false, features = [
"batch",
"fast",
"serde",
"zeroize",
"batch",
"fast",
"serde",
"zeroize",
] }
either = "1.10.0"
flarch = "0.7.0"
Expand All @@ -91,60 +96,65 @@ genawaiter = "0.99.1"
generic-array = { version = "0.14.7", features = ["serde"] }
getrandom = "0.2.12"
git2 = "0.19.0"
glob = "0.3.1"
gloo-utils = "0.2.0"
heck = "0.4.1"
hex = "0.4.3"
http = "1.1.0"
humantime = "2.1.0"
glob = "0.3.1"
gloo-utils = "0.2.0"
indexed_db_futures = "0.4.1"
insta = "1.36.1"
is-terminal = "0.4.12"
alloy-sol-types = "0.8.18"
alloy = { version = "0.9.2", default-features = false }
alloy-signer-local = "0.9.2"
alloy-primitives = { version = "0.8.18", default-features = false, features = ["serde"] }
js-sys = "0.3.70"
k8s-openapi = { version = "0.21.1", features = ["v1_28"] }
kube = "0.88.1"
linked-hash-map = "0.5.6"
log = "0.4.21"
lru = "0.12.3"
linked-hash-map = "0.5.6"
num-bigint = "0.4.3"
num-traits = "0.2.18"
octocrab = "0.42.1"
oneshot = "0.1.6"
pathdiff = "0.2.1"
port-selector = "0.1.6"
prettyplease = "0.2.16"
prometheus = "0.13.3"
proc-macro-error = "1.0.4"
proc-macro2 = "1.0"
prometheus = "0.13.3"
proptest = { version = "1.6.0", default-features = false, features = ["alloc"] }
prost = "0.13.2"
quote = "1.0"
rand = { version = "0.8.5", default-features = false }
rand_chacha = { version = "0.3.1", default-features = false }
rand_distr = { version = "0.4.3", default-features = false }
ruzstd = "0.7.1"
k8s-openapi = { version = "0.21.1", features = ["v1_28"] }
pathdiff = "0.2.1"
kube = "0.88.1"
rcgen = "0.12.1"
reqwest = { version = "0.11.24", default-features = false, features = [
"rustls-tls",
"rustls-tls",
] }
revm = "19.4.0"
revm-interpreter = { version = "15.1.0", features = [ "serde" ] }
revm-interpreter = { version = "15.1.0", features = ["serde"] }
revm-precompile = "16.0.0"
revm-primitives = "15.1.0"
rocksdb = "0.21.0"
secp256k1 = { version = "0.30.0", default-features = false, features = [ "alloc", "rand", "serde" ] }
ruzstd = "0.7.1"
scylla = "0.15.1"
secp256k1 = { version = "0.30.0", default-features = false, features = [
"alloc",
"rand",
"serde",
] }
semver = "1.0.22"
serde = { version = "1.0.197", features = ["derive"] }
serde_bytes = "0.11.14"
serde_json = "1.0.114"
serde_yaml = "0.8.26"
serde-name = "0.2.1"
serde-reflection = "0.3.6"
serde-wasm-bindgen = "0.6.5"
serde_with = { version = "3", default-features = false, features = ["alloc", "macros"] }
serde_bytes = "0.11.14"
serde_json = "1.0.114"
serde_with = { version = "3", default-features = false, features = [
"alloc",
"macros",
] }
serde_yaml = "0.8.26"
sha3 = "0.10.8"
similar-asserts = "1.5.0"
static_assertions = "1.1.0"
Expand All @@ -153,27 +163,27 @@ syn = "2.0.52"
tempfile = "3.10.1"
test-case = "3.3.1"
test-log = { version = "0.2.15", default-features = false, features = [
"trace",
"trace",
] }
test-strategy = "0.3.1"
thiserror = "1.0.65"
thiserror-context = "0.1.1"
tokio = "1.36.0"
tokio-stream = "0.1.14"
tokio-test = "0.4.3"
tokio-util = "0.7.10"
toml = "0.8.10"
tonic = { version = "0.12.3", default-features = false }
tonic-build = { version = "0.12.3", default-features = false }
tonic-health = "0.12"
tonic-reflection = "0.12"
tonic-web = "0.12"
tonic-web-wasm-client = "0.6.0"
tokio = "1.36.0"
tokio-stream = "0.1.14"
tokio-test = "0.4.3"
tokio-util = "0.7.10"
toml = "0.8.10"
tower-http = "0.5.2"
tower = "0.4.13"
tower-http = "0.5.2"
tracing = { version = "0.1.40", features = ["release_max_level_debug"] }
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
"env-filter",
"env-filter",
] }
tracing-web = "0.1.3"
trait-variant = "0.1.1"
Expand All @@ -186,19 +196,18 @@ wasm-instrument = "0.4.0"
wasm_thread = "0.3.0"
wasmer = { package = "linera-wasmer", version = "4.4.0-linera.6", default-features = false }
wasmer-compiler-singlepass = { package = "linera-wasmer-compiler-singlepass", version = "4.4.0-linera.6", default-features = false, features = [
"std",
"unwind",
"avx",
"std",
"unwind",
"avx",
] }
wasmparser = "0.101.1"
wasmtime = { version = "25.0.0", default-features = false, features = [
"cranelift",
"runtime",
"std",
"cranelift",
"runtime",
"std",
] }
wasmtimer = "0.2.0"
web-sys = "0.3.69"
js-sys = "0.3.70"
web-time = "1.1.0"
wit-bindgen = "0.24.0"
zstd = "0.13.2"
Expand All @@ -217,27 +226,27 @@ linera-indexer-graphql-client = { version = "0.14.0", path = "./linera-indexer/g
linera-indexer-plugins = { version = "0.14.0", path = "./linera-indexer/plugins" }
linera-rpc = { version = "0.14.0", path = "./linera-rpc" }
linera-sdk = { version = "0.14.0", path = "./linera-sdk" }
linera-sdk-derive = { version = "0.14.0", path = "./linera-sdk-derive" }
linera-service = { version = "0.14.0", path = "./linera-service", default-features = false }
linera-service-graphql-client = { version = "0.14.0", path = "./linera-service-graphql-client" }
linera-storage = { version = "0.14.0", path = "./linera-storage", default-features = false }
linera-storage-service = { version = "0.14.0", path = "./linera-storage-service", default-features = false }
linera-version = { version = "0.14.0", path = "./linera-version" }
linera-views = { version = "0.14.0", path = "./linera-views", default-features = false }
linera-views-derive = { version = "0.14.0", path = "./linera-views-derive" }
linera-witty = { version = "0.14.0", path = "./linera-witty" }
linera-witty-macros = { version = "0.14.0", path = "./linera-witty-macros" }
linera-sdk-derive = { version = "0.14.0", path = "./linera-sdk-derive" }
linera-service = { version = "0.14.0", path = "./linera-service", default-features = false }
linera-service-graphql-client = { version = "0.14.0", path = "./linera-service-graphql-client" }

amm = { path = "./examples/amm" }
counter = { path = "./examples/counter" }
meta-counter = { path = "./examples/meta-counter" }
crowd-funding = { path = "./examples/crowd-funding" }
ethereum-tracker = { path = "./examples/ethereum-tracker" }
fungible = { path = "./examples/fungible" }
matching-engine = { path = "./examples/matching-engine" }
meta-counter = { path = "./examples/meta-counter" }
native-fungible = { path = "./examples/native-fungible" }
non-fungible = { path = "./examples/non-fungible" }
crowd-funding = { path = "./examples/crowd-funding" }
matching-engine = { path = "./examples/matching-engine" }
social = { path = "./examples/social" }
amm = { path = "./examples/amm" }

[profile.release]
lto = "thin"
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

* `brew install jq`
* `cargo install cargo-rdme`
* `cargo install cargo-sort`
* `cargo install taplo-cli`
* `cargo install cargo-all-features`
* `cargo install cargo-machete`

Expand All @@ -51,7 +51,7 @@ Alternatively, we have added experimental Nix support (see `flake.nix`).

* `sudo apt-get install jq`
* `cargo install cargo-rdme`
* `cargo install cargo-sort`
* `cargo install taplo-cli`
* `cargo install cargo-all-features`
* `cargo install cargo-machete`

Expand Down
Loading

0 comments on commit 851321a

Please sign in to comment.