fix(ci): sync Cargo.lock after version bump so --locked steps pass
#5
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/release-locked-lockfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
With the YAML now valid (#4), the release run got to
cargo testand failed:The "Set the crate version to match the release" step
sedsCargo.toml's version (0.1.0→ next). That changes this crate's own entry inCargo.lock, so the subsequent--lockedtest/build steps refuse to reconcile it. (cargo fmt --check, which runs before the bump, passed — confirming the bump is the trigger.)Fix
After the version bump, sync just the workspace member into the lock:
--workspaceupdates only local workspace packages' versions inCargo.lock; every dependency pin is left untouched, so--lockedstill guarantees reproducible dependencies. The commit step alreadygit addsCargo.lock, so the synced lock ships with the bump.Verification (reproduced locally)
🤖 Generated with Claude Code
The release step rewrites the crate version in Cargo.toml (0.1.0 -> next), which desyncs this crate's own entry in Cargo.lock. The following `cargo test/build --locked` steps then abort: error: cannot update the lock file ... because --locked was passed Run `cargo update --manifest-path sidecar/Cargo.toml --workspace` right after the bump: it updates only the workspace member's version in the lock and leaves every dependency pin untouched, so --locked still guarantees reproducible deps. Verified locally — reproduced the exact failure, then confirmed the sync makes `cargo build --locked` succeed with 6 dependencies unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ