Repository navigation
gazelle/common: keep dangling BUILD symlinks across snapshot restore - #6438
Merged
Merged
Conversation
…loses #6214) Record treated a dangling BUILD.bazel symlink as absent, so a failed run removed the user's link. Record now stores the link target, and Restore recreates the link only when it is missing or points elsewhere. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK
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.
Closes #6214
Change
BuildSnapshot.Recordstores the link target when the path is a dangling symlink (or a symlink to a directory), instead of recording it as absent.BuildSnapshot.Restorekeeps a recorded link that still points at the same target. Otherwise it removes what is there and recreates the link withos.Symlink.TestBuildSnapshotDanglingLinkcovers an intact link, a removed link and a repointed link. It skips on Windows.Checks
tools/dx check --apply //gazelle/common/...: passed.tools/dx test //gazelle/common:common_test -- --test_filter=TestBuildSnapshot: passed.tools/dx check --apply --affectedfailed in the resolve phase before any check ran. Cause on main:python/tests/fixtures/native_ext/BUILD.bazelloadspython_py_test, which//python/rules:defs.bzldoes not export. Not touched by this PR.*_consumer_testtargets (left to CI). Windows was not run.Remaining
Restorekeeps an intact link and does not remove that file. Not covered here.Assisted by Claude.