Repository navigation
chore: fix Rust 1.97 toolchain breakage (clippy lints + BQL parse stack) - #1745
Conversation
Stable Rust 1.97.0 (2026-07-07) adds useless-borrows-in-formatting, which fires on ten pre-existing redundant `&` in format!/panic! args (core format/transaction.rs, query bql_integration_test.rs). CI's dtolnay stable picked up the new toolchain and every open PR went red on code none of them touched; this clears main so the queue can merge. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Fixes new Rust 1.97 Clippy useless-borrows-in-formatting warnings by removing redundant borrows in format!/panic! arguments, keeping behavior unchanged and restoring CI green.
Changes:
- Removed redundant
&inpanic!debug formatting in BQL integration tests. - Removed redundant
&informat!calls used for indentation/comment formatting in transaction formatting code.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/rustledger-query/tests/bql_integration_test.rs | Removes redundant borrows in panic! formatting to satisfy the new Clippy lint. |
| crates/rustledger-core/src/format/transaction.rs | Removes redundant borrows in format! calls for building indent/comment strings to satisfy the new Clippy lint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Benchmark Results
vs main branch (2026-07-10)
What do these numbers mean?
|
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Rust 1.97 grew the chumsky grammar's debug-build stack frames enough that even 50 nesting levels overflowed a 2 MiB cargo-test worker thread (1.96 handled 100+ on the same stack) — the Test job SIGABRT'd in moderate_nesting_still_parses and Code Coverage aborted the same way. Tuning MAX_NESTING_DEPTH to the frame size of the toolchain of the week is a losing game: the budget depends on whichever thread happens to call parse (main = 8 MiB, cargo-test/rayon workers = 2 MiB). On native targets, parse() now runs the recursive descent on a scoped thread with an explicit 16 MiB stack, making the depth budget owned by the parser rather than inherited. The pre-scan nesting cap stays at 128 (unchanged language); wasm32 keeps the direct call (no threads there; engine stack limits apply as before). Verified on BOTH 1.96 (nix) and 1.97 (rustup): full query suite green, clippy clean. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Scope grew while landing: 1.97 also broke the Test and Code Coverage jobs — the chumsky grammar's debug frames grew enough that |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…1749) Floating on dtolnay/rust-toolchain@stable meant the 1.97.0 release (2026-07-07) landed in CI overnight and turned every open PR red on code none of them touched — new clippy lints plus a debug-frame-size change that SIGABRT'd the BQL parser tests (#1745 has the full story; it cost a working day across 15 PRs). All 36 floating `toolchain: stable` sites are now pinned to 1.97.0 with a comment pointing at the incident; bump the pin deliberately, running the local dual-toolchain check first (rustup stable + nix 1.96 MSRV). Nightly and MSRV pins are untouched. Co-authored-by: Claude Fable 5 <[email protected]>
* docs: canonical-function discipline and toolchain-bump runbook Distills the 2026-07 duplication review (PRs #1731-#1743) into standing guidance: the one anti-pattern every found bug traced to, the ranked remedies (call the canonical / document divergence at both sites / drift-guard test), the current canonical inventory, the two supporting test-hygiene rules (#1729, #1742), and the lockstep toolchain-bump procedure learned from #1745/#1751. Co-Authored-By: Claude Fable 5 <[email protected]> * docs: scope the pin claim to stable-channel sites (review) Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
What
Fixes the ten
useless-borrows-in-formattingviolations that stable Rust 1.97.0 (released 2026-07-07) introduced as a new clippy lint — redundant&onformat!/panic!arguments inrustledger-core/src/format/transaction.rs(5) andrustledger-query/tests/bql_integration_test.rs(5). Mechanical; no behavior change.Why
CI's
dtolnay/rust-toolchain@stablepicked up 1.97.0 overnight and every open PR went red (Clippy/build/Test/quality) on code none of them touched. This PR clears main so the merge queue (#1731–#1744) can proceed; each PR branch then gets a base update to pick this up.Verified with a local 1.97.0 sweep:
cargo clippy --all-features --all-targets -- -D warningsis clean workspace-wide after this change,cargo fmt --checkunaffected, touched crates' tests green.Merge this first, before anything else in the queue.
🤖 Generated with Claude Code