Rename set to depset in .bzl files
`set` is a deprecated alias of `depset` and will be removed from Bazel starting from 0.6. Change-Id: I0d9ca334d7fd32a36c1af4ca6baaed08d1600a9a
This commit is contained in:
parent
3a3aed6ead
commit
2d2cf71d20
@ -1,5 +1,5 @@
|
||||
def _classpath_collector(ctx):
|
||||
all = set()
|
||||
all = depset()
|
||||
for d in ctx.attr.deps:
|
||||
if hasattr(d, 'java'):
|
||||
all += d.java.transitive_runtime_deps
|
||||
|
@ -193,7 +193,7 @@ def _gwt_binary_impl(ctx):
|
||||
)
|
||||
|
||||
def _get_transitive_closure(ctx):
|
||||
deps = set()
|
||||
deps = depset()
|
||||
for dep in ctx.attr.module_deps:
|
||||
deps += dep.java.transitive_runtime_deps
|
||||
deps += dep.java.transitive_source_jars
|
||||
|
@ -17,8 +17,8 @@
|
||||
def _impl(ctx):
|
||||
zip_output = ctx.outputs.zip
|
||||
|
||||
transitive_jar_set = set()
|
||||
source_jars = set()
|
||||
transitive_jar_set = depset()
|
||||
source_jars = depset()
|
||||
for l in ctx.attr.libs:
|
||||
source_jars += l.java.source_jars
|
||||
transitive_jar_set += l.java.transitive_deps
|
||||
|
@ -124,18 +124,18 @@ bower_archive = repository_rule(
|
||||
)
|
||||
|
||||
def _bower_component_impl(ctx):
|
||||
transitive_zipfiles = set([ctx.file.zipfile])
|
||||
transitive_zipfiles = depset([ctx.file.zipfile])
|
||||
for d in ctx.attr.deps:
|
||||
transitive_zipfiles += d.transitive_zipfiles
|
||||
|
||||
transitive_licenses = set()
|
||||
transitive_licenses = depset()
|
||||
if ctx.file.license:
|
||||
transitive_licenses += set([ctx.file.license])
|
||||
transitive_licenses += depset([ctx.file.license])
|
||||
|
||||
for d in ctx.attr.deps:
|
||||
transitive_licenses += d.transitive_licenses
|
||||
|
||||
transitive_versions = set(ctx.files.version_json)
|
||||
transitive_versions = depset(ctx.files.version_json)
|
||||
for d in ctx.attr.deps:
|
||||
transitive_versions += d.transitive_versions
|
||||
|
||||
@ -173,13 +173,13 @@ def _js_component(ctx):
|
||||
command = cmd,
|
||||
mnemonic = "GenBowerZip")
|
||||
|
||||
licenses = set()
|
||||
licenses = depset()
|
||||
if ctx.file.license:
|
||||
licenses += set([ctx.file.license])
|
||||
licenses += depset([ctx.file.license])
|
||||
|
||||
return struct(
|
||||
transitive_zipfiles=list([ctx.outputs.zip]),
|
||||
transitive_versions=set([]),
|
||||
transitive_versions=depset(),
|
||||
transitive_licenses=licenses)
|
||||
|
||||
js_component = rule(
|
||||
@ -219,15 +219,15 @@ def bower_component(name, license=None, **kwargs):
|
||||
|
||||
def _bower_component_bundle_impl(ctx):
|
||||
"""A bunch of bower components zipped up."""
|
||||
zips = set([])
|
||||
zips = depset()
|
||||
for d in ctx.attr.deps:
|
||||
zips += d.transitive_zipfiles
|
||||
|
||||
versions = set([])
|
||||
versions = depset()
|
||||
for d in ctx.attr.deps:
|
||||
versions += d.transitive_versions
|
||||
|
||||
licenses = set([])
|
||||
licenses = depset()
|
||||
for d in ctx.attr.deps:
|
||||
licenses += d.transitive_versions
|
||||
|
||||
|
@ -73,7 +73,7 @@ def _war_impl(ctx):
|
||||
]
|
||||
|
||||
# Add lib
|
||||
transitive_lib_deps = set()
|
||||
transitive_lib_deps = depset()
|
||||
for l in ctx.attr.libs:
|
||||
if hasattr(l, 'java'):
|
||||
transitive_lib_deps += l.java.transitive_runtime_deps
|
||||
@ -85,7 +85,7 @@ def _war_impl(ctx):
|
||||
inputs.append(dep)
|
||||
|
||||
# Add pgm lib
|
||||
transitive_pgmlib_deps = set()
|
||||
transitive_pgmlib_deps = depset()
|
||||
for l in ctx.attr.pgmlibs:
|
||||
transitive_pgmlib_deps += l.java.transitive_runtime_deps
|
||||
|
||||
@ -95,7 +95,7 @@ def _war_impl(ctx):
|
||||
inputs.append(dep)
|
||||
|
||||
# Add context
|
||||
transitive_context_deps = set()
|
||||
transitive_context_deps = depset()
|
||||
if ctx.attr.context:
|
||||
for jar in ctx.attr.context:
|
||||
if hasattr(jar, 'java'):
|
||||
|
@ -59,7 +59,7 @@ def gerrit_plugin(
|
||||
if gwt_module:
|
||||
native.java_library(
|
||||
name = name + '__gwt_module',
|
||||
resources = list(set(srcs + resources)),
|
||||
resources = depset(srcs + resources).to_list(),
|
||||
runtime_deps = deps + GWT_PLUGIN_DEPS,
|
||||
visibility = ['//visibility:public'],
|
||||
**kwargs
|
||||
|
Loading…
x
Reference in New Issue
Block a user