Repository navigation
fix(ci): keep Cargo.lock in step with the released version - #6
Merged
Merged
Conversation
The publish job bumped Cargo.toml to 0.2.0, committed it, and left Cargo.lock recording 0.1.0, because nothing regenerated the lock. The next --locked check then died with 'cannot update the lock file ... because --locked was passed'. - Cargo.lock carries the workspace version now (0.2.0), which fixes main. - The publish job runs 'cargo update --workspace' after the sed, with the pinned toolchain installed, so the next bump cannot drift again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clippy on
maindies before it compiles anything:Cause: the
publishjob bumpsCargo.tomlto the new version, commits it, and never regeneratesCargo.lock. The lock records the workspace package's own version, so after the v0.2.0 release the lock still saidversion = "0.1.0"forkubetitan, and every--lockedinvocation since (clippy, tests) fails with that message. The[skip ci]on the bump commit is why nothing caught it at the time.Fix:
Cargo.lock:kubetitan0.1.0 -> 0.2.0, somainis green again.release.yaml: install the pinned Rust toolchain inpublishand runcargo update --workspaceright after the versionsed.--workspacere-resolves members only, so the diff is that one version line and no dependency moves.Checked locally:
cargo update --workspacechanges exactly one line;cargo clippy --all-targets --locked -- -D warningsexits 0;cargo test --locked51 passed.