This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new 6535274 Update Bazel protobuf rules (#3271)
6535274 is described below
commit 65352744699312d4d8056a8b6c344982f9f7e89c
Author: Rohan Agarwal <[email protected]>
AuthorDate: Wed May 29 14:57:09 2019 -0700
Update Bazel protobuf rules (#3271)
* update genproto bzl
* no-op
---
tools/rules/genproto.bzl | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tools/rules/genproto.bzl b/tools/rules/genproto.bzl
index ea3db55..09ec679 100644
--- a/tools/rules/genproto.bzl
+++ b/tools/rules/genproto.bzl
@@ -22,7 +22,7 @@ def proto_package_impl(ctx):
genproto_base_attrs = {
"src": attr.label(
- allow_files = FileType([".proto"]),
+ allow_files = [".proto"],
single_file = True,
),
"deps": attr.label_list(
@@ -61,15 +61,18 @@ def genproto_java_impl(ctx):
return struct(files = depset([srcjar]))
+genproto_java_attrs = dict(genproto_base_attrs)
+genproto_java_attrs.update({
+ "_protoc": attr.label(
+ default = Label("@com_google_protobuf//:protoc"),
+ allow_files = True,
+ single_file = True,
+ ),
+})
+
genproto_java = rule(
genproto_java_impl,
- attrs = genproto_base_attrs + {
- "_protoc": attr.label(
- default = Label("@com_google_protobuf//:protoc"),
- allow_files = True,
- single_file = True,
- ),
- },
+ attrs = genproto_java_attrs,
)
def proto_library(name, src=None, includes=[], deps=[], visibility=None,