Repository navigation
fix(ci): restore green CI — MSRV test run and clippy on current stable - #70
Merged
Merged
Conversation
The 1.65.0 rows ran `cargo test`, which compiles dev-dependencies. serde_json now pulls in zmij (needs 1.71) and itoa 1.0.18 (needs 1.68), so those rows failed on a chain the crate does not expose to consumers. Move MSRV verification into its own job that builds the library only -- what `rust-version` actually promises. Clippy 1.98.0 also flagged two real leftovers: * `Iter` and `Ancestors` carried a `for<'enc> Encoding` bound whose binder is vacuous, since `Encoding` takes no lifetime parameter. Their `Utf8` counterparts already use the plain bound, so drop it here to match. * `unix::DISALLOWED_FILENAME_BYTES` wants the same `#[allow(clippy::byte_char_slices)]` its windows sibling already carries, keeping the byte list parallel with `DISALLOWED_FILENAME_CHARS`. Claude-Session: https://claude.ai/code/session_01A5uCQTmXn119ATyfP27hfe
Resolve the dependency graph under stable with `CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback`, then hand the resulting lockfile to 1.65.0 with `--locked`. Stable honors the `rust-version` of every crate in the graph, so serde_json lands on 1.0.145 and itoa on 1.0.15 rather than releases needing 1.71. Pinning in Cargo.toml cannot do this: an exact `serde_json` pin still leaves cargo 1.65 free to take itoa 1.0.18 and ryu 1.0.23, both of which are transitive and out of reach of our manifest. Claude-Session: https://claude.ai/code/session_01A5uCQTmXn119ATyfP27hfe
chipsenkbeil
force-pushed
the
fix/ci-msrv-and-clippy
branch
from
August 29, 2026 02:09
fd96245 to
eaba01e
Compare
The `--locked` dance the MSRV job performs is not discoverable from the workflow alone, and a contributor running `cargo +1.65.0 test` by hand hits a resolution failure with no hint as to why. Write it down in the README under a new Development section, alongside the test, fmt and clippy invocations CI gates on, and repeat the command in AGENTS.md. Also correct the rustc badge text, which still read 1.58.1 while the badge image and Cargo.toml both say 1.65.0. Claude-Session: https://claude.ai/code/session_01A5uCQTmXn119ATyfP27hfe
chipsenkbeil
force-pushed
the
fix/ci-msrv-and-clippy
branch
from
August 29, 2026 02:28
eaba01e to
7d97e7c
Compare
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.
Fixes the red CI on
main(run 33142530648) without touchingrust-version = "1.65.0".1. MSRV job runs the full test suite again
The 1.65.0 rows were failing before compiling anything:
zmijis transitive underserde_json, our only dev-dependency, and fixing it just exposes the next one — verified on a real 1.65.0 toolchain thatitoa v1.0.18(needs 1.68) andryu v1.0.23(needs 1.71) are queued behind it.Cargo.toml pinning cannot fix this, which I checked rather than assumed. With
serde_json = "=1.0.145"pinned exactly, cargo 1.65 still resolves:A manifest constraint reaches direct dependencies only, and every crate that forces the newer compiler is transitive.
The fix uses cargo's MSRV-aware resolver, which lives in stable, not in 1.65:
Stable honors the
rust-versionof every crate in the graph and picks serde_json 1.0.145, itoa 1.0.15, ryu 1.0.20. It also writes a v3 lockfile, which 1.65 can read, because it takes our declaredrust-versioninto account. Nothing is pinned by hand, so this keeps working as serde_json's dependency set churns — it already swapped ryu for zmij once.CI result: both MSRV rows now run the full suite and pass (3m3s / 2m49s), rather than only compiling the library.
2. Clippy on current stable
Two genuine leftovers, fixed rather than blanket-silenced:
extra_unused_lifetimes(11 sites,src/common/non_utf8/iter.rs) —IterandAncestorswere boundedT: for<'enc> Encoding.Encodingtakes no lifetime parameter, so the binder is vacuous; theUtf8Iter/Utf8Ancestorstwins insrc/common/utf8/iter.rsalready use the plain form. Dropping it makes the two files mirror each other again, and the bound is semantically identical, so nothing breaks for callers.byte_char_slices(src/unix/constants.rs:20) — given the same#[allow(clippy::byte_char_slices)]thatwindows::DISALLOWED_FILENAME_BYTEShas carried since the Clippy 1.90 pass. The suggested*b"/\0"would break the visual parallel withDISALLOWED_FILENAME_CHARSon the next line.3. Documentation
The
--lockeddance is not discoverable from the workflow alone, and a contributor runningcargo +1.65.0 testby hand hits a resolution error with no hint why. Added a Development section to the README covering the test / fmt / clippy invocations CI gates on plus a Minimum supported Rust version subsection with the reproduction, and repeated the command in AGENTS.md.Also corrected the rustc badge text, which read
1.58.1+while the badge image and Cargo.toml both said 1.65.0.Verification
Locally, on stable 1.98.0 and a real 1.65.0 toolchain:
cargo +1.65.0 test --locked --all-features— 369 doctests plus unit tests, all passingcargo +1.65.0 test --locked --no-default-features— exit 0cargo clippy --all-targets×{--all-features, --no-default-features}withRUSTFLAGS=-Dwarnings— exit 0--target x86_64-pc-windows-msvc, covering the#[cfg(windows)]code only the windows runner lints — exit 0cargo test --all-features,cargo fmt --check— cleanAll 17 CI checks green.
Answering "can
cargo testimply--locked?"No. I probed for it rather than guessing:
build.locked,net.locked,term.lockedin.cargo/config.tomlare all rejected asunused config keywarning: user-defined alias 'test' is ignored, because it is shadowed by a built-in commandA non-shadowing alias (
cargo tl = "test --locked") does work, but it cannot select the+1.65.0toolchain, so it would not carry the MSRV run anyway.--lockedstays explicit in the workflow and in the documented command.Worth noting
--lockedis a guard rather than load-bearing here: 1.65 will happily reuse the generated lockfile without it. It is there so that a lockfile which stops satisfying the manifest fails loudly instead of quietly resolving back to releases that need a newer compiler.https://claude.ai/code/session_01A5uCQTmXn119ATyfP27hfe