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:
- 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.
- Have
SpawnRunner#prefetchInputs create the runfiles tree before local action execution (as is already the case for other local action inputs).
- 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.
Currently,
--remote_download_toplevelcauses all runfiles symlink trees to be created (not just the top-level ones), while--remote_download_minimalimplies--nobuild_runfile_symlinksand activates a separate code path (seeRunfilesTreeUpdater) to create input runfiles trees just before local action execution.Instead, we should:
RemoteOutputService#canCreateSymlinksand provide an emptyRemoteOutputService#createSymlinksimplementation; this ensures the runfiles tree is never materialized as a direct result of running theSymlinkTreeAction.SpawnRunner#prefetchInputscreate the runfiles tree before local action execution (as is already the case for other local action inputs).AbstractActionInputPrefetcher#finalizeActioncreate 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_linksfrom the expansion of--remote_download_minimal.