fix: self-heal Cargo.lock in Release instead of depending on release-please - #44
Merged
Merged
Conversation
…ease Verified locally before pushing this time: staged the exact drift (Cargo.toml bumped, Cargo.lock left behind), confirmed cargo build --locked fails the same way CI did, then confirmed cargo update -p forgeguard --precise <version> fixes only the forgeguard entry (cargo reports "9 unchanged dependencies") and the --locked build succeeds afterward. Also checked the version-already-current case is a safe no-op. The /Cargo.lock extra-file from #41 didn't work in practice - release-please logged "No entries modified in $.package[?(@.name==\"forgeguard\")].version" despite the filter matching fine against a plain TOML parse locally, so their internal TOML handling isn't behaving the way I assumed. Reverting that dead config rather than leaving a misleading no-op in place. This makes Release self-sufficient: it no longer depends on release-please (or any other PR) getting Cargo.lock right in the tagged commit. Every release, tag-verify and build now pin Cargo.lock's forgeguard entry to the tag's own version before running anything --locked, so the tagged commit's actual Cargo.lock content stops mattering.
4 tasks
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.
Summary
/Cargo.lockextra-file (JSONPath-filtered TOML update) doesn't actually work: PR chore(main): release 0.11.2 #43's latest release-please run logged⚠ No entries modified in $.package[?(@.name=="forgeguard")].version, despite that exact filter matching cleanly against a plain TOML parse locally. Their internal TOML handling isn't behaving the way I assumed from reading the updater source — reverting that config since a non-functional silent no-op is worse than not having it.Changes
.github/workflows/release.yml: bothverifyand eachbuildmatrix job now runcargo update -p forgeguard --precise <tag-version>right after the toolchain is installed, before anything--locked. This touches only theforgeguardworkspace member's own lock entry — verified locally, not guessed.release-please-config.json: reverted the non-functional/Cargo.lockextra-file from fix: let release-please manage Cargo.lock's version entry #41.Verified locally before pushing (per your ask not to keep guessing)
crates/forgeguard-cli/Cargo.tomlto0.11.2without touchingCargo.lock— reproduced the exact CI failure (cargo build --locked→ "cannot update the lock file").cargo update -p forgeguard --precise 0.11.2— diff showed exactly one line changed (forgeguard's version), cargo itself reported "9 unchanged dependencies".cargo build --locked --release -p forgeguard— succeeded.--precisecommand with the version already current — no-op, exit 0, no diff (safe to always run unconditionally).Sequencing
This needs to merge before PR #43 (
chore(main): release 0.11.2) merges, so the chainedReleasejob picks up the self-heal step frommain's latestrelease.ymlwhen it runs. PR #43's tagged commit will still carry a stale Cargo.lock either way (unavoidable, same as #41 not fixing that at the source) — this fix means that no longer matters.Test plan
Release's build matrix jobs all succeed (not justverify) and all assets uploadnpm-publishfires and@suiflex/forgeguard@0.11.2publishes