mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 01:10:14 +02:00
Rename set to depset in .bzl and BUILD files
`set` is a deprecated alias for `depset` and will be removed soon. This change does not change the behavior in any way. More information: https://docs.google.com/document/d/1oeXoXGOsaUlre1NCap8RJDNNXX1x6RiXeJKhEzl5-qk Tested: tap_presubmit Some tests failed; test failures are believed to be unrelated to this CL ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=165921608
This commit is contained in:
parent
e90e840757
commit
77c62219d5
2 changed files with 4 additions and 4 deletions
|
@ -42,7 +42,7 @@ def collect_runfiles(targets):
|
|||
Returns:
|
||||
A list of Bazel files.
|
||||
"""
|
||||
data = set()
|
||||
data = depset()
|
||||
for target in targets:
|
||||
if hasattr(target, "runfiles"):
|
||||
data += target.runfiles.files
|
||||
|
|
|
@ -132,7 +132,7 @@ def _zip_file(ctx):
|
|||
if (s.startswith('/') or s.endswith('/') or
|
||||
d.startswith('/') or d.endswith('/')):
|
||||
fail('mappings should not begin or end with slash')
|
||||
srcs = set()
|
||||
srcs = depset()
|
||||
srcs += ctx.files.srcs
|
||||
srcs += ctx.files.data
|
||||
srcs += collect_runfiles(ctx.attr.data)
|
||||
|
@ -150,7 +150,7 @@ def _zip_file(ctx):
|
|||
for dep in ctx.attr.deps]
|
||||
cmd += ['rm %s' % filename for filename in ctx.attr.exclude]
|
||||
cmd += ['mkdir -p "${tmp}/%s"' % zip_path
|
||||
for zip_path in set(
|
||||
for zip_path in depset(
|
||||
[zip_path[:zip_path.rindex('/')]
|
||||
for _, zip_path in mapped if '/' in zip_path])]
|
||||
cmd += ['ln -sf "${repo}/%s" "${tmp}/%s"' % (path, zip_path)
|
||||
|
@ -177,7 +177,7 @@ def _zip_file(ctx):
|
|||
mnemonic='zip',
|
||||
progress_message='Creating zip with %d inputs %s' % (
|
||||
len(inputs), ctx.label))
|
||||
return struct(files=set([ctx.outputs.out]), zip_file=ctx.outputs.out)
|
||||
return struct(files=depset([ctx.outputs.out]), zip_file=ctx.outputs.out)
|
||||
|
||||
def _map_sources(ctx, srcs, mappings):
|
||||
"""Calculates paths in zip file for srcs."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue