build(msrv)!: honest MSRV in lockstep with the toolchain + let-chain adoption - #575
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (37)
WalkthroughThe change raises the Rust baseline to 1.93.0, adds CI enforcement between Cargo and toolchain versions, and applies chained conditional syntax across consensus, command, record, pipeline, scheduling, and parser code without described behavior changes. ChangesRust toolchain alignment
Processing and command paths
Pipeline and tooling
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (76.88%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
+ Coverage 92.84% 92.88% +0.03%
==========================================
Files 166 166
Lines 102064 101989 -75
==========================================
- Hits 94765 94734 -31
+ Misses 7299 7255 -44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…in and adopt let-chains
The declared `rust-version = "1.87.0"` was never true: the dependency floor
(`noodles`, `wide` -> 1.89; `sysinfo` -> 1.88) already requires more, and CI
builds on the `rust-toolchain.toml` pin (1.93.0). An unverified, false MSRV is a
worse promise than none.
Set `rust-version` to the pinned toolchain (1.93.0), so fgumi supports exactly
the Rust it is developed and tested on -- a single source of truth instead of
two drifting numbers. A follow-on commit adds the CI gate that keeps them equal.
Honestly declaring MSRV >= 1.88 means clippy now (correctly) suggests collapsing
`if cond { if let PAT = expr { .. } }` into let-chains, which stabilized in 1.88.
Adopt them workspace-wide (85 sites, applied via `cargo clippy --fix`) rather
than suppressing the lint: the code, the toolchain, and the lints now agree.
The rewrites are behavior-preserving (nested-if -> `&& let` short-circuits
identically); full test suite green (4756 passed).
Add an `msrv-lockstep` job that fails if `rust-version` in Cargo.toml and the `channel` in rust-toolchain.toml drift apart. This is what keeps the MSRV claim honest going forward: neither number can be bumped without the other, and since every other CI job builds on the rust-toolchain.toml channel, keeping them equal means all of CI already verifies the MSRV compiles -- no separate MSRV build job is needed. Document the policy in CLAUDE.md.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
The Rust 1.93 toolchain adopted in #575 makes clippy's collapsible_if fire on the nested `if outer_bases_length > 0 { if let Some(outer_qual) = outer_bases_qual }` in mask_consensus_quals_query_based, failing the lint job on main (and every PR rebased onto it). Collapse it into a let-chain, the idiom the newer toolchain unlocks, per the project's policy of adopting new idioms rather than suppressing the lint.
Why
rust-version = "1.87.0"was a false, unverified promise. The dependency floor already requires more (noodles/wide→ 1.89,sysinfo→ 1.88), and CI builds on therust-toolchain.tomlpin (1.93.0). An MSRV that nothing tests and that consumers can't rely on is worse than none — the same "contract with no gate rots" failure as the doctest/doc-link gaps.The principled fix is one enforced source of truth: fgumi supports exactly the Rust it develops and tests on.
What
1.
rust-version→ 1.93.0, matching therust-toolchain.tomlchannel (build(msrv)!commit).2. Adopt let-chains (85 sites). Honestly declaring MSRV ≥ 1.88 means clippy correctly suggests collapsing
if cond { if let PAT = expr { … } }intoif cond && let PAT = expr { … }(stabilized 1.88). Rather than suppress the lint to hide the MSRV, the code adopts the idiom the MSRV unlocks — applied mechanically viacargo clippy --fix, so the code, the toolchain, and the lints all agree. Rewrites are behavior-preserving (nested-if and&& letshort-circuit identically).3.
msrv-lockstepCI job (ci:commit) that fails if the two versions drift. Because every other job builds on the rust-toolchain.toml channel, keeping them equal means all of CI already verifies the MSRV compiles — no separate MSRV build job needed.Marked
!(semver-relevant)Raising the published MSRV is a breaking change for the crates.io libraries — hence the
!. It reflects reality (the crates already didn't build below ~1.89); this makes the manifest honest.Verification
cargo ci-lint(-D warnings -W clippy::pedantic) at 1.93 → clean (was 85collapsible_ifbefore the migration).cargo ci-test→ 4756 passed, 0 failed (behavior preserved).cargo ci-fmt→ clean.rust-version=1.93.0 == channel=1.93.0→ OK.Notes
Summary by CodeRabbit
Compatibility
Build Reliability
Maintenance