Skip to content

Commit

Permalink
fix: use patched cargo-sort
Browse files Browse the repository at this point in the history
cargo-sort had problems parsing workspace dependencies, looks like it's
unmaintained. Fortunately someone made a fix in DevinR528/cargo-sort#55.
The branch was cloned and diff examined, we can use for now until we can
invest more time to find and configure a replacement.

Signed-off-by: Marcel Guzik <[email protected]>
  • Loading branch information
Bravo555 committed Nov 22, 2023
1 parent c2cc3a9 commit 4595986
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Install cargo sort
run: cargo install cargo-sort
# this is a patched version that can handle workspace dependency definitions. cargo-sort looks to be
# unmaintained, so it should be replaced in the future, this is a quick fix for things to keep working for now
run: cargo install --git https://github.com/Bravo555/cargo-sort.git --branch nipunn/sort_workspace_deps cargo-sort

- name: Cargo sort
run: cargo sort -w . --check
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ default:
# Install necessary tools
install-tools:
rustup component add rustfmt --toolchain nightly
cargo install cargo-sort cargo-nextest
cargo install --git https://github.com/Bravo555/cargo-sort.git --branch nipunn/sort_workspace_deps cargo-sort
cargo install cargo-nextest

# Check if necessary tools are installed
[private]
Expand Down

0 comments on commit 4595986

Please sign in to comment.