Skip to content

Commit

Permalink
Unconditionally use runfiles.merge_all in write_source_file
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky authored and jbedard committed Oct 16, 2023
1 parent 5077d5a commit a4f9994
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/private/write_source_file.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a4f9994

Please sign in to comment.