Track emulated symlinked directories recursively#29221
Track emulated symlinked directories recursively#29221abishekgiri wants to merge 2 commits intobazelbuild:masterfrom
Conversation
|
Updated the invalidation tracking so emulated symlinks to directories now record recursive inputs, while emulated file symlinks keep the existing shallow file watch. Added focused unit coverage for both cases. Local Bazel validation on this machine is still blocked by the Xcode license gate from apple_support. |
|
@abishekgiri Could you please take a look at the failing checks? |
I traced the failing presubmits from Buildkite build #32714 to one shared strict-deps issue in The new test path references A targeted local |
|
Please update PR description according to our PR template |
Summary
This change makes
repository_ctx.symlink()record recursive invalidation inputs when a non-native symlink fallback targets a directory.What Changed
DirTreeinput for emulated symlinks to directorieswatch_tree()and the symlink fallback pathStarlarkRepositoryContextTestRoot Cause
On filesystems where Bazel cannot create native symlinks,
repository_ctx.symlink()falls back to behavior that still needs invalidation tracking. The fallback always recorded aFileinput, which is too shallow for directory targets because it only captures that the directory exists, not changes anywhere under the tree.Impact
Directory-backed fallback symlinks can now invalidate repository contents correctly when files are added, removed, or modified under the source tree.
Testing
Tried locally:
bazel test //src/test/java/com/google/devtools/build/lib/bazel/repository/starlark:StarlarkTests --test_filter='.*EmulatedSymlink.*' --test_output=errorsCurrent local blocker:
xcrunfailed with code 69 fromapple_support)