Unconditionally use runfiles.merge_all in write_source_file

This commit is contained in:
David Zbarsky 2023-10-12 10:44:14 -04:00 committed by Jason Bedard
parent 5077d5ae4a
commit a4f99946c6
1 changed files with 3 additions and 6 deletions

View File

@ -340,12 +340,9 @@ def _write_source_file_impl(ctx):
files = runfiles,
transitive_files = ctx.attr.in_file.files if ctx.attr.in_file else None,
)
deps_runfiles = [dep[DefaultInfo].default_runfiles for dep in ctx.attr.additional_update_targets]
if "merge_all" in dir(runfiles):
runfiles = runfiles.merge_all(deps_runfiles)
else:
for dep in deps_runfiles:
runfiles = runfiles.merge(dep)
runfiles = runfiles.merge_all(
[dep[DefaultInfo].default_runfiles for dep in ctx.attr.additional_update_targets],
)
return [
DefaultInfo(