Skip to content

Commit 69041c4

Browse files
committed
build: rework justfile toolchain input
1 parent d61b339 commit 69041c4

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.cspell.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version: "0.2"
2+
words:
3+
- rustup

actix-service/src/ready.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! When MSRV is 1.48, replace with `core::future::Ready` and `core::future::ready()`.
1+
//! When MSRV is 1.82, replace with `core::future::Ready` and `core::future::ready()`.
22
33
use core::{
44
future::Future,

justfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ fmt:
2121
# Downgrade dependencies necessary to run MSRV checks/tests.
2222
[private]
2323
downgrade-for-msrv:
24-
cargo update -p=clap --precise=4.4.18 # next ver: 1.74.0
2524
cargo update -p=native-tls --precise=0.2.13 # next ver: 1.80.0
2625
cargo update -p=litemap --precise=0.7.4 # next ver: 1.81.0
2726
cargo update -p=zerofrom --precise=0.1.5 # next ver: 1.81.0
@@ -42,38 +41,42 @@ non_linux_all_features_list := ```
4241
```
4342
all_crate_features := if os() == "linux" { "--all-features" } else { "--features='" + non_linux_all_features_list + "'" }
4443

44+
toolchain := ""
45+
4546
# Run Clippy over workspace.
46-
clippy toolchain="":
47+
clippy:
4748
cargo {{ toolchain }} clippy --workspace --all-targets {{ all_crate_features }}
4849

4950
# Run Clippy using MSRV.
50-
clippy-msrv: downgrade-for-msrv (clippy msrv_rustup)
51+
clippy-msrv: downgrade-for-msrv
52+
@just toolchain={{ msrv_rustup }} clippy
5153

5254
# Test workspace code.
5355
[macos]
5456
[windows]
55-
test toolchain="":
57+
test:
5658
cargo {{ toolchain }} test --lib --tests --package=actix-macros
5759
cargo {{ toolchain }} nextest run --no-tests=warn --workspace --exclude=actix-macros --no-default-features
5860
cargo {{ toolchain }} nextest run --no-tests=warn --workspace --exclude=actix-macros {{ all_crate_features }}
5961

6062
# Test workspace code.
6163
[linux]
62-
test toolchain="":
64+
test:
6365
cargo {{ toolchain }} test --lib --tests --package=actix-macros
6466
cargo {{ toolchain }} nextest run --no-tests=warn --workspace --exclude=actix-macros --no-default-features
6567
cargo {{ toolchain }} nextest run --no-tests=warn --workspace --exclude=actix-macros {{ non_linux_all_features_list }}
6668
cargo {{ toolchain }} nextest run --no-tests=warn --workspace --exclude=actix-macros {{ all_crate_features }}
6769

6870
# Test workspace using MSRV.
69-
test-msrv: downgrade-for-msrv (test msrv_rustup)
71+
test-msrv: downgrade-for-msrv
72+
@just toolchain={{ msrv_rustup }} test
7073

7174
# Test workspace docs.
72-
test-docs toolchain="": && doc
75+
test-docs: && doc
7376
cargo {{ toolchain }} test --doc --workspace {{ all_crate_features }} --no-fail-fast -- --nocapture
7477

7578
# Test workspace.
76-
test-all toolchain="": (test toolchain) (test-docs toolchain)
79+
test-all: test test-docs
7780

7881
# Document crates in workspace.
7982
doc *args: && doc-set-workspace-crates
@@ -96,12 +99,12 @@ doc-watch:
9699
cargo watch -- just doc
97100

98101
# Check for unintentional external type exposure on all crates in workspace.
99-
check-external-types-all toolchain="+nightly":
102+
check-external-types-all:
100103
#!/usr/bin/env bash
101104
set -euo pipefail
102105
exit=0
103106
for f in $(find . -mindepth 2 -maxdepth 2 -name Cargo.toml | grep -vE "\-codegen/|\-derive/|\-macros/"); do
104-
if ! just check-external-types-manifest "$f" {{ toolchain }}; then exit=1; fi
107+
if ! just toolchain="+nightly" check-external-types-manifest "$f"; then exit=1; fi
105108
echo
106109
echo
107110
done
@@ -114,9 +117,9 @@ check-external-types-all-table toolchain="+nightly":
114117
for f in $(find . -mindepth 2 -maxdepth 2 -name Cargo.toml | grep -vE "\-codegen/|\-derive/|\-macros/"); do
115118
echo
116119
echo "Checking for $f"
117-
just check-external-types-manifest "$f" {{ toolchain }} --output-format=markdown-table
120+
just toolchain="+nightly" check-external-types-manifest "$f" --output-format=markdown-table
118121
done
119122

120123
# Check for unintentional external type exposure on a crate.
121-
check-external-types-manifest manifest_path toolchain="+nightly" *extra_args="":
124+
check-external-types-manifest manifest_path *extra_args="":
122125
cargo {{ toolchain }} check-external-types --manifest-path "{{ manifest_path }}" {{ extra_args }}

0 commit comments

Comments
 (0)