fix(release): sync Cargo.lock on version bump (VS-76) #94
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VS-76-release-cargo-lock-sync"
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
Merged release commit
41cf233 Release v0.1.0shippedCargo.tomlat0.1.0whileCargo.lockstill pinned all 26 workspace members at0.0.1. Every--lockedbuild now fails, e.g.check.Dockerfileline 56cargo clippy --workspace --all-targets --locked -- --deny warnings:error: cannot update the lock file ... because --locked was passed to prevent this. This blocksjust pre-commitandjust create-release(the release image build).Root cause
The
create-releaserecipe bumpsworkspace.package.versioninCargo.tomland commits only that file. It never regeneratesCargo.lock, even though the line-203 comment claims it bumps the version "in both files".Fix
Regenerate
Cargo.lockso its 26 workspace-member entries read0.1.0(viacargo update --workspace --offline, which scopes the change to workspace crates and leaves the 57 external deps untouched). Then patch thecreate-releaserecipe to runcargo update --workspace --offlineandgit add Cargo.lockalongsideCargo.tomlbefore the release commit, so future bumps carry a matching lock.Verification
cargo metadata --lockedsucceeds. The exact failing CI commandcargo clippy --workspace --all-targets --locked -- --deny warningsfinishes clean. Fulljust pre-commitpasses locally (fmt, clippy, check, 431 tests).Fixes VS-76.