1- toolchain := " nightly-2026-01-01"
1+ # Used ONLY by fmt/fmt-check: rustfmt.toml relies on nightly-only options.
2+ # check/clippy/test run on stable via rust-toolchain.toml, so lints always
3+ # match the shipped compiler.
4+ fmt_toolchain := " nightly-2026-01-01"
5+
6+ # Used ONLY to resolve dependency updates: min-publish-age needs a newer
7+ # nightly than the fmt pin above.
8+ resolver_toolchain := " nightly-2026-06-21"
9+
10+ [doc("""
11+ Update dependencies under the publish-age cooldown (.cargo/config.toml):
12+ versions published less than 14 days ago are excluded from resolution.
13+ Resolution done on stable (cargo add, plain cargo update) is NOT covered;
14+ this recipe is the intended path for routine updates. Git dependencies
15+ have no publish age and are refreshed WITHOUT any cooldown: review their
16+ lockfile rev changes manually.
17+ """ )]
18+ update * args :
19+ rustup toolchain install {{ resolver_toolchain}} > / dev/ null 2 >&1 && cargo + {{ resolver_toolchain}} update -Z min-publish-age {{ args}}
20+
21+ [doc("""
22+ Escape hatch for an urgent update to a version younger than the cooldown,
23+ e.g. `just update-allow h2 0.4.16`. The bypass applies to the WHOLE
24+ resolution of this invocation (transitive picks included), so review the
25+ full Cargo.lock diff, not just the target package.
26+ """ )]
27+ update-allow package version :
28+ @ echo " NOTE: the cooldown bypass is invocation-global; review the full Cargo.lock diff.
29+ rustup toolchain install {{ resolver_toolchain}} > /dev/null 2>&1 && CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo +{{ resolver_toolchain}} update -Z min-publish-age -p {{ package}} --precise {{ version}}
230
331fmt:
4- rustup toolchain install {{ toolchain }} > / dev/ null 2 >&1 && \
5- cargo + {{ toolchain }} fmt
32+ rustup toolchain install {{ fmt_toolchain }} > /dev/null 2>&1 && \
33+ cargo +{{ fmt_toolchain }} fmt
634
735fmt-check:
8- rustup toolchain install {{ toolchain }} > / dev/ null 2 >&1 && \
9- cargo + {{ toolchain }} fmt --check
36+ rustup toolchain install {{ fmt_toolchain }} > /dev/null 2>&1 && \
37+ cargo +{{ fmt_toolchain }} fmt --check
1038
1139clippy:
12- cargo + {{ toolchain }} clippy --all-features --no-deps -- -D warnings
40+ cargo clippy --locked --all-features --no-deps -- -D warnings
1341
1442# Everything needed to run before pushing
1543checklist:
16- cargo check
44+ cargo check --locked || (echo " Cargo.lock out of date: resolve with ' just update' (publish-age cooldown), not plain cargo update " && exit 1)
1745 just fmt
1846 just clippy
1947 just test
2048 cargo audit
49+ @out=$(cargo +{{ resolver_toolchain}} update --dry-run -Z min-publish-age 2>&1 | grep -E " Downgrading|is too new" || true); \
50+ if [ -n " $out" ]; then echo " WARNING: lockfile pins crates younger than the publish-age cooldown:" ; echo " $out" ; fi
2151
2252# ===================================
2353# === Build Commands for Services ===
@@ -99,7 +129,7 @@ clean:
99129
100130# Runs the suite of tests for all commit-boost crates.
101131test:
102- cargo test --all-features
132+ cargo test --locked -- all-features
103133
104134# =====================
105135# === Test Coverage ===
@@ -112,11 +142,11 @@ test:
112142# If results look wrong after upgrading cargo-llvm-cov, run `just coverage-clean` first.
113143# Requires: cargo install cargo-llvm-cov && rustup component add llvm-tools-preview
114144coverage:
115- cargo llvm-cov --all-features --html --open
145+ cargo llvm-cov --locked -- all-features --html --open
116146
117147# Print a quick coverage summary to the terminal without opening a browser.
118148coverage-summary:
119- cargo llvm-cov --all-features --summary-only
149+ cargo llvm-cov --locked -- all-features --summary-only
120150
121151# Remove all coverage instrumentation artifacts produced by cargo-llvm-cov.
122152coverage-clean:
@@ -141,7 +171,7 @@ coverage-clean:
141171 - critcmp: baseline diffing tool used by bench-compare
142172""" )]
143173bench-install-tools:
144- cargo install cargo-criterion critcmp
174+ cargo install --locked cargo-criterion critcmp
145175
146176[doc("""
147177 Run microbenchmarks and save results as a named baseline. Example: just bench main
@@ -151,14 +181,14 @@ bench-install-tools:
151181 For accurate baseline comparisons, use bench-compare instead.
152182""" )]
153183bench baseline:
154- cargo bench --package cb-bench-micro -- --save-baseline {{ baseline}}
184+ cargo bench --locked -- package cb-bench-micro -- --save-baseline {{ baseline}}
155185
156186[doc("""
157187 Run microbenchmarks, save results as " current" , then diff against a named baseline.
158188 Example: just bench-compare main
159189""" )]
160190bench-compare baseline:
161- cargo bench --package cb-bench-micro -- --save-baseline current
191+ cargo bench --locked -- package cb-bench-micro -- --save-baseline current
162192 critcmp {{ baseline}} current
163193
164194# =================
0 commit comments