Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce alphabetically ordered cargo deps #71

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about moving this job and the check-code to a new workflow as they are more about code quality than testing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really have an opinion on that. @magick93, what do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO splitting it wont add too much value, though I'm happy to do it.

The best value - in the case of test and code qual. comes from giving rapid feedback to the dev. It its not too computationally intensive maybe a pre-commit hook may be better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good comment diego, let's merge for now but as workflows become more refined we can revisit

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 }
Loading