ci: assert the root Cargo.lock is in sync - #7589
Conversation
`--locked` on the existing workspace clippy invocation costs no extra CI time --
that step already resolves the whole workspace -- and turns silent lockfile drift
into a fast, explicit failure.
Without it, removing a crate leaves its dependency subtree stranded in
Cargo.lock, every later cargo invocation rewrites the file in place, and CI stays
green because no root-workspace command passed `--locked`. Nightly Release is
where it surfaces, because `cargo release --execute` aborts on a dirty tree:
error: uncommitted changes detected, please resolve before release:
Cargo.lock (Status(WT_MODIFIED))
That is exactly how #7556 (remove mtgish importer) broke three consecutive
nightlies before #7588 resynced the lock. `--locked` was already used for the
Tauri manifest; this extends the same guarantee to the root workspace.
Verified both directions against origin/main in an isolated worktree: with the
pre-#7588 lockfile the guarded command exits 101 in under two seconds on
"cannot update the lock file ... because --locked was passed", before compiling
anything; with the current lockfile it clears resolution and proceeds to compile
normally.
Claude-Session: https://claude.ai/code/session_01DJgbxMGnPi6MFfGUe15Y3P
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe CI workflow updates the Rust Clippy command to use ChangesCI validation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The CI change makes root Cargo.lock drift fail fast instead of allowing later commands to rewrite it; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
--lockedon the existing workspace clippy invocation costs no extra CI time --that step already resolves the whole workspace -- and turns silent lockfile drift
into a fast, explicit failure.
Without it, removing a crate leaves its dependency subtree stranded in
Cargo.lock, every later cargo invocation rewrites the file in place, and CI stays
green because no root-workspace command passed
--locked. Nightly Release iswhere it surfaces, because
cargo release --executeaborts on a dirty tree:That is exactly how #7556 (remove mtgish importer) broke three consecutive
nightlies before #7588 resynced the lock.
--lockedwas already used for theTauri manifest; this extends the same guarantee to the root workspace.
Verified both directions against origin/main in an isolated worktree: with the
pre-#7588 lockfile the guarded command exits 101 in under two seconds on
"cannot update the lock file ... because --locked was passed", before compiling
anything; with the current lockfile it clears resolution and proceeds to compile
normally.
Claude-Session: https://claude.ai/code/session_01DJgbxMGnPi6MFfGUe15Y3P
Summary by CodeRabbit