mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Replace iteration over depsets with an explicit .to_list() call
The old pattern did an implicit iteration over a depset which will be forbidden in the future since it is potentially expensive. The new to_list() call is still expensive but it will be more visible. LSC: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=221266626
This commit is contained in:
parent
4a31232423
commit
9fa2a84c35
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ def _zip_file(ctx):
|
|||
for _, zip_path in mapped
|
||||
if "/" in zip_path
|
||||
],
|
||||
)
|
||||
).to_list()
|
||||
]
|
||||
cmd += [
|
||||
'ln -sf "${repo}/%s" "${tmp}/%s"' % (path, zip_path)
|
||||
|
@ -181,7 +181,7 @@ def _zip_file(ctx):
|
|||
ctx.file_action(output = script, content = "\n".join(cmd), executable = True)
|
||||
inputs = [ctx.file._zipper]
|
||||
inputs += [dep.zip_file for dep in ctx.attr.deps]
|
||||
inputs += list(srcs)
|
||||
inputs += srcs.to_list()
|
||||
ctx.action(
|
||||
inputs = inputs,
|
||||
outputs = [ctx.outputs.out],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue