Lazily create local symlinks with BwoB #26045
Open
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.
Unconditionally creating symlinks results in unnecessary I/O and may not even be supported by the host (e.g. on Windows). Instead, only create symlinks in the remote action file system and rely on the prefetcher to materialize them when needed by downstream actions. This applies to both "alias" symlinks (
declare_file
, but materialized as a symlink to some other file) and "unresolved" symlinks (declare_symlink
).Fixes #21747
RELNOTES[inc]: Symlinks are now treated just like regular files with
--remote_download_minimal
and--remote_download_toplevel
and may not be materialized on disk if not requested explicitly. Symlinks created for outputs declared viactx.actions.declare_file
may now be materialized with absolute target paths, even when the action creating them uses a relative symlink. Usectx.actions.declare_symlink
for precise control over the target path.