Remove the + operator on dicts from .bzl files

The + operator on dicts is deprecated and will be removed from future
version of Bazel.

Change-Id: I9f3db02f13c1c56c3afc4cc94b142513f0ae3908
This commit is contained in:
Vladimir Moskva 2018-01-05 16:59:03 +01:00
parent 0a84e20e74
commit 4c8be85fcf
2 changed files with 6 additions and 6 deletions

View File

@ -122,9 +122,9 @@ _asciidoc_attrs = {
} }
_asciidoc = rule( _asciidoc = rule(
attrs = _asciidoc_attrs + { attrs = dict(_asciidoc_attrs.items() + {
"outs": attr.output_list(mandatory = True), "outs": attr.output_list(mandatory = True),
}, }.items()),
implementation = _asciidoc_impl, implementation = _asciidoc_impl,
) )

View File

@ -177,10 +177,10 @@ def _js_component(ctx):
js_component = rule( js_component = rule(
_js_component, _js_component,
attrs = _common_attrs + { attrs = dict(_common_attrs.items() + {
"srcs": attr.label_list(allow_files = [".js"]), "srcs": attr.label_list(allow_files = [".js"]),
"license": attr.label(allow_single_file = True), "license": attr.label(allow_single_file = True),
}, }.items()),
outputs = { outputs = {
"zip": "%{name}.zip", "zip": "%{name}.zip",
}, },
@ -188,14 +188,14 @@ js_component = rule(
_bower_component = rule( _bower_component = rule(
_bower_component_impl, _bower_component_impl,
attrs = _common_attrs + { attrs = dict(_common_attrs.items() + {
"zipfile": attr.label(allow_single_file = [".zip"]), "zipfile": attr.label(allow_single_file = [".zip"]),
"license": attr.label(allow_single_file = True), "license": attr.label(allow_single_file = True),
"version_json": attr.label(allow_files = [".json"]), "version_json": attr.label(allow_files = [".json"]),
# If set, define by hand, and don't regenerate this entry in bower2bazel. # If set, define by hand, and don't regenerate this entry in bower2bazel.
"seed": attr.bool(default = False), "seed": attr.bool(default = False),
}, }.items()),
) )
# TODO(hanwen): make license mandatory. # TODO(hanwen): make license mandatory.