Skip to content

Do not create runfile trees unnecessarily when building without the bytes #18580

@tjgq

Description

@tjgq

Currently, --remote_download_toplevel causes all runfiles symlink trees to be created (not just the top-level ones), while --remote_download_minimal implies --nobuild_runfile_symlinks and activates a separate code path (see RunfilesTreeUpdater) to create input runfiles trees just before local action execution.

Instead, we should:

  1. Return true from RemoteOutputService#canCreateSymlinks and provide an empty RemoteOutputService#createSymlinks implementation; this ensures the runfiles tree is never materialized as a direct result of running the SymlinkTreeAction.
  2. Have SpawnRunner#prefetchInputs create the runfiles tree before local action execution (as is already the case for other local action inputs).
  3. Have AbstractActionInputPrefetcher#finalizeAction create the runfiles tree for toplevel targets (as is already the case for other top-level outputs).

This would ensure a minimal set of runfile trees is created in all cases, and let us omit --nobuild_runfile_links from the expansion of --remote_download_minimal.

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Remote-ExecIssues and PRs for the Execution (Remote) teamtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions