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 |
|
@meteorcloudy Updated the PR description to follow Bazel’s template. Thanks! also http_file: add root BUILD to improve error when referencing repo root |
Description
This PR updates
repository_ctx.symlink()invalidation tracking for emulated symlinks that target directories.When Bazel cannot create a native symlink and falls back to copy-like behavior, directory targets now record a recursive
DirTreeinput instead of a shallowFileinput. File targets keep the existing shallow watch behavior.This change also adds unit coverage for emulated file and directory symlinks in
StarlarkRepositoryContextTest.Motivation
Directory-backed emulated symlinks were not tracked deeply enough for repository invalidation.
The fallback path always recorded a
Fileinput, which only captures that the directory exists. That is not sufficient to detect files being added, removed, or modified under the directory tree. Recording a recursiveDirTreeinput fixes that behavior and adds regression coverage for it.Build API Changes
No
Checklist
Release Notes
RELNOTES: None