Skip to content

Commit 14d472d

Browse files
committed
Use --workspace where --all is deprecated
Most `cargo` commands that support `--all` to affect the entire workspace rather than a single package have deprecated it in favor of `--workspace` and treat them as synonyms. The major exception (at least as relevant to this repository) is `cargo fmt`, which recognizes `--all` and not `--workspace`. This replaces `--all` with `--workspace` in `cargo check`, `cargo doc`, and `cargo nextest` commands in a CI workflow and the `justfile`. All these subcommands have deprecated `--all` in favor of `--workspace`, and document this in relevant `--help` output. (Other major subcommands that recommend `--workspace` over its deprecated `--all` alias include `cargo build` and `cargo test`, but there are currently no occurrences of such commands with `--all` in this repository.)
1 parent a876533 commit 14d472d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ jobs:
6767
brew install tree openssl gnu-sed
6868
- name: "cargo check default features"
6969
if: startsWith(matrix.os, 'windows')
70-
run: cargo check --all --bins --examples
70+
run: cargo check --workspace --bins --examples
7171
- uses: taiki-e/install-action@v2
7272
with:
7373
tool: nextest
7474
- name: "Test (nextest)"
7575
env:
7676
GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI: 1
77-
run: cargo nextest run --all --no-fail-fast
77+
run: cargo nextest run --workspace --no-fail-fast
7878
- name: Doctest
7979
run: cargo test --doc
8080
- name: Check that tracked archives are up to date

justfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ clippy-fix:
3838

3939
# Build all code in suitable configurations
4040
check:
41-
cargo check --all
41+
cargo check --workspace
4242
cargo check --no-default-features --features small
4343
# assure compile error occurs
4444
if cargo check --features lean-async 2>/dev/null; then false; else true; fi
@@ -146,8 +146,8 @@ check:
146146

147147
# Run cargo doc on all crates
148148
doc $RUSTDOCFLAGS="-D warnings":
149-
cargo doc --all --no-deps --features need-more-recent-msrv
150-
cargo doc --features=max,lean,small --all --no-deps --features need-more-recent-msrv
149+
cargo doc --workspace --no-deps --features need-more-recent-msrv
150+
cargo doc --features=max,lean,small --workspace --no-deps --features need-more-recent-msrv
151151

152152
# run all unit tests
153153
unit-tests:

0 commit comments

Comments
 (0)