Skip to content

Commit

Permalink
Enforce alphabetically ordered cargo deps (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: Mac L <[email protected]>
  • Loading branch information
dknopik and macladson authored Dec 16, 2024
1 parent 4182bf6 commit 6ec4b6a
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 45 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,18 @@ jobs:
# cache-target: release
# - name: Run Makefile to trigger the bash script
# run: make cli
cargo-sort:
name: cargo-sort
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable Rust
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
bins: cargo-sort
- name: Run cargo sort to check if Cargo.toml files are sorted
run: cargo sort --check --workspace
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
members = [
"anchor",
"anchor/client",
"anchor/common/ssv_types",
"anchor/common/version",
"anchor/http_api",
"anchor/http_metrics",
"anchor/network",
"anchor/processor",
"anchor/qbft",
"anchor/common/ssv_types",
]
resolver = "2"

Expand All @@ -21,11 +21,11 @@ client = { path = "anchor/client" }
qbft = { path = "anchor/qbft" }
http_api = { path = "anchor/http_api" }
http_metrics = { path = "anchor/http_metrics" }
network = { path ="anchor/network"}
version = { path ="anchor/common/version"}
network = { path = "anchor/network" }
version = { path = "anchor/common/version" }
processor = { path = "anchor/processor" }
ssv_types = { path = "anchor/common/ssv_types" }
lighthouse_network = { git = "https://github.com/sigp/lighthouse", branch = "unstable"}
lighthouse_network = { git = "https://github.com/sigp/lighthouse", branch = "unstable" }
task_executor = { git = "https://github.com/sigp/lighthouse", branch = "unstable", default-features = false, features = [ "tracing", ] }
metrics = { git = "https://github.com/agemanning/lighthouse", branch = "modularize-vc" }
validator_metrics = { git = "https://github.com/agemanning/lighthouse", branch = "modularize-vc" }
Expand All @@ -36,12 +36,12 @@ types = { git = "https://github.com/sigp/lighthouse", branch = "unstable" }
derive_more = { version = "1.0.0", features = ["full"] }
async-channel = "1.9"
axum = "0.7.7"
clap = { version = "4.5.15", features = ["derive", "wrap_help"]}
clap = { version = "4.5.15", features = ["derive", "wrap_help"] }
discv5 = "0.8.0"
dirs = "5.0.1"
either = "1.13.0"
futures = "0.3.30"
tower-http = {version = "0.6", features = ["cors"] }
tower-http = { version = "0.6", features = ["cors"] }
hyper = "1.4"
num_cpus = "1"
parking_lot = "0.12"
Expand Down
6 changes: 3 additions & 3 deletions anchor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ authors = ["Sigma Prime <[email protected]>"]
rust-version = "1.81.0"

[dependencies]
task_executor = { workspace = true }
sensitive_url = { workspace = true }
async-channel = { workspace = true }
clap = { workspace = true }
client = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
sensitive_url = { workspace = true }
serde = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
client = { workspace = true }
tracing-subscriber = { workspace = true }

[dev-dependencies]
Expand Down
25 changes: 12 additions & 13 deletions anchor/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ name = "client"
path = "src/lib.rs"

[dependencies]
task_executor = { workspace = true }
http_api = { workspace = true }
version = { workspace = true }
http_metrics = { workspace = true }
clap = { workspace = true }
serde = { workspace = true }
strum = { workspace = true }
sensitive_url = { workspace = true }
dirs = { workspace = true }
ethereum_hashing = "0.7.0"
fdlimit = "0.3"
http_api = { workspace = true }
http_metrics = { workspace = true }
hyper = { workspace = true }
tracing = { workspace = true }
network = { workspace = true }
unused_port = { workspace = true }
tokio = { workspace = true }
parking_lot = { workspace = true }
processor = { workspace = true }
# Local dependencies
fdlimit = "0.3"
ethereum_hashing = "0.7.0"
sensitive_url = { workspace = true }
serde = { workspace = true }
strum = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
unused_port = { workspace = true }
version = { workspace = true }
6 changes: 3 additions & 3 deletions anchor/common/ssv_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = { workspace = true }
authors = ["Sigma Prime <[email protected]>"]

[dependencies]
types = { workspace = true}
openssl = { workspace = true }
derive_more = { workspace = true }
base64 = { workspace = true }
derive_more = { workspace = true }
openssl = { workspace = true }
types = { workspace = true }
2 changes: 1 addition & 1 deletion anchor/common/version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ git-version = "0.3.9"
target_info = "0.1.0"

[dev-dependencies]
regex = "1.11"
regex = "1.11"
4 changes: 2 additions & 2 deletions anchor/http_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name = "http_api"
path = "src/lib.rs"

[dependencies]
task_executor = { workspace = true }
axum = { workspace = true }
slot_clock = { workspace = true }
serde = { workspace = true }
slot_clock = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
4 changes: 2 additions & 2 deletions anchor/http_metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"

[dependencies]
axum = { workspace = true }
metrics = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true }
tokio = { workspace = true }
tower-http = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true }
validator_metrics = { workspace = true }
metrics = { workspace = true }
# Group dependencies
warp_utils = { git = "https://github.com/agemanning/lighthouse", branch = "modularize-vc" }
16 changes: 8 additions & 8 deletions anchor/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ edition = { workspace = true }
authors = ["Sigma Prime <[email protected]>"]

[dependencies]
tokio = { workspace = true }
libp2p = { version = "0.54", default-features = false, features = ["identify", "yamux", "noise", "secp256k1", "tcp", "tokio", "macros", "gossipsub", "quic", "ping"] }
futures = { workspace = true }
task_executor = { workspace = true }
version = { workspace = true }
lighthouse_network = { workspace = true}
dirs = { workspace = true }
discv5 = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
libp2p = { version = "0.54", default-features = false, features = ["identify", "yamux", "noise", "secp256k1", "tcp", "tokio", "macros", "gossipsub", "quic", "ping"] }
lighthouse_network = { workspace = true }
serde = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
version = { workspace = true }

[dev-dependencies]
async-channel = { workspace = true }
async-channel = { workspace = true }
10 changes: 5 additions & 5 deletions anchor/processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ authors = ["Sigma Prime <[email protected]"]
edition = { workspace = true }

[dependencies]
tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread", "macros"] }
tracing = { workspace = true }
task_executor = { workspace = true }
serde = { workspace = true }
num_cpus = { workspace = true }
metrics = { workspace = true }
num_cpus = { workspace = true }
qbft = { workspace = true }
serde = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread", "macros"] }
tracing = { workspace = true }

[dev-dependencies]
async-channel = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions anchor/qbft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ authors = ["Sigma Prime <[email protected]"]
edition = { workspace = true }

[dependencies]
derive_more = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
tracing = { workspace = true }
futures = { workspace = true }
tracing-subscriber = { workspace = true }
derive_more = { workspace = true }

0 comments on commit 6ec4b6a

Please sign in to comment.