Repository navigation
fix(id): unknown build variant marker forces rebuild (#6883) - #7345
Merged
Merged
Conversation
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.
Fix for issue #6883 (fallback claim by lane code-u; queue backend down, code#6619):
pkgs/id/scripts/build.shtrusted the on-disk binary whenever the variant marker was missing, empty, or garbage — only an exact other-variant marker forced a rebuild — so a lib binary could silently pass as the web build (and vice versa) at the sharedtarget/*/idpath. The marker was also written non-atomically, which is how truncated markers are produced.Changes:
target/and renamed over the marker file, so an interrupted build cannot leave an empty/truncated marker.pkgs/id/scripts/build-sh-test.sh: missing-marker, empty-marker, and garbage-marker cases (build one variant, disturb the marker, request the other, assert cargo runs with the correct flags and the marker is rewritten), plus an exact-match control asserting an intact matching marker still takes the up-to-date path without invoking cargo.Verification (laptop, stubbed-cargo fixture):
bash scripts/build-sh-test.sh— build-sh tests passed (all pre-existing lib debug/release, assets, and web control cases plus the four new cases).build.shfails at the first new case —missing marker did not force a lib rebuild— confirming the new cases catch the filed bug.Closes #6883
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.