From 96c783be9261cae11c5079c246075b7baf1106e6 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Fri, 9 Jun 2017 17:03:49 -0700 Subject: [PATCH 1/2] Export protobuf sources as filegroup --- bazel/repositories.bzl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index b12760991..6a209365f 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -7,12 +7,20 @@ def api_dependencies(): build_file_content = """ load("@protobuf_bzl//:protobuf.bzl", "cc_proto_library", "py_proto_library") -cc_proto_library( - name = "http_api_protos", +filegroup( + name = "http_api_protos_src", srcs = [ "google/api/annotations.proto", "google/api/http.proto", ], + visibility = ["//visibility:public"], +) + +cc_proto_library( + name = "http_api_protos", + srcs = [ + ":http_apis_protos_src", + ], default_runtime = "//external:protobuf", protoc = "//external:protoc", visibility = ["//visibility:public"], @@ -22,8 +30,7 @@ cc_proto_library( py_proto_library( name = "http_api_protos_py", srcs = [ - "google/api/annotations.proto", - "google/api/http.proto", + ":http_apis_protos_src", ], include = ".", default_runtime = "//external:protobuf_python", From 48c73d108ba2035db98420476d2c82e0240daed3 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 13 Jun 2017 11:53:36 -0700 Subject: [PATCH 2/2] fix proto_libraries --- bazel/repositories.bzl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 6a209365f..d326cd98e 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -19,7 +19,8 @@ filegroup( cc_proto_library( name = "http_api_protos", srcs = [ - ":http_apis_protos_src", + "google/api/annotations.proto", + "google/api/http.proto", ], default_runtime = "//external:protobuf", protoc = "//external:protoc", @@ -30,7 +31,8 @@ cc_proto_library( py_proto_library( name = "http_api_protos_py", srcs = [ - ":http_apis_protos_src", + "google/api/annotations.proto", + "google/api/http.proto", ], include = ".", default_runtime = "//external:protobuf_python",