build: bump the static-analysis toolchain to 1.97 - #89
Closed
martinhavelka (wukchung) wants to merge 1 commit into
Closed
build: bump the static-analysis toolchain to 1.97#89martinhavelka (wukchung) wants to merge 1 commit into
martinhavelka (wukchung) wants to merge 1 commit into
Conversation
cargo-semver-checks builds rustdoc for the crate under test in a scratch project that does not use the workspace Cargo.lock, so it re-resolves dependencies to their newest compatible versions. kstring 2.0.3 and later require rustc 1.96, and the lock only pins 2.0.2 for the workspace build, so the rustdoc build fails on the pinned 1.95 toolchain and anvil-semver-check exits 101. This surfaced when cargo-aprz-lib arrived, the first crate reaching kstring through rustsec -> gix -> gix-attributes. It fails on every pull request and on the scheduled run against main. RUST_LATEST selects the static-analysis toolchain and is independent of RUST_MSRV, which stays at 1.95, so the MSRV promise is unchanged. Current stable is 1.97. 1.97 no longer reports single_use_lifetimes on group_all_metrics_by_category, which made its expect attribute unfulfilled; clippy.allow_attributes rules out swapping it for allow, so the dead attribute is removed.
Contributor
Author
|
🤖 Consolidated into #88, which now carries both the toolchain bump and the cargo-spellcheck bump. Closing this one; the branch is superseded, not abandoned. |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (99.9%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
=====================================
Coverage 99.9% 99.9%
=====================================
Files 135 135
Lines 17449 17449
=====================================
Hits 17448 17448
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖
Impact
Unblocks every pull request in the repository, and the scheduled run against
main.anvil-semver-checkcurrently fails on all fourpr-fastlegs.Problem
cargo-semver-checksbuilds rustdoc for the crate under test in a scratch project (cargo new+cargo add --path) that does not use the workspaceCargo.lock. It therefore re-resolves dependencies to their newest compatible versions.kstring2.0.3 and later require rustc 1.96. The workspace lock pins 2.0.2, so the normal build is fine, but the scratch rustdoc build takes 2.0.4 and fails against the pinned 1.95 toolchain:Nothing in the repository changed to cause this. It appeared when
cargo-aprz-liblanded in #76 -- the first crate reachingkstringthroughrustsec->gix->gix-attributes-- and it broke as soon askstring2.0.3 was published.Change
RUST_LATESTselects the static-analysis and mutation-testing toolchain. It is deliberately a separate knob fromRUST_MSRV, which encodes the MSRV promise, but had drifted to the same value. Current stable is 1.97.rust-toolchain.tomlandRUST_LATEST: 1.95 -> 1.97RUST_MSRVstays at 1.95, so the MSRV promise is unchanged1.97 no longer reports
single_use_lifetimesongroup_all_metrics_by_category, leaving its#[expect]unfulfilled -- a warning, and therefore an error under the-D warningspolicy.clippy.allow_attributesrules out swapping it for#[allow], so the now-dead attribute is removed.Validation
Run from the repository root on Windows x86_64:
cargo semver-checks --package cargo-aprz-lib --baseline-rev origin/main--223 checks: 223 pass, exit 0. Fails with exit 101 before this change.cargo clippy --workspace --all-targets --all-features-- clean, no warningscargo fmt --all --check-- cleancargo anvil-- 87 items, all unchanged; no artifact churn from the bumpReviewer notes
Pinning
kstringwas considered and rejected: it enters transitively, so constraining it would mean declaring an otherwise-unused direct dependency, whichanvil-udepswould then flag. Upgradingcargo-semver-checksto 0.50.0 was also tested and does not help -- the scratch-project build is unchanged.