Skip to content

Commit

Permalink
bazel: Add load statements for proto_library (envoyproxy#9367)
Browse files Browse the repository at this point in the history
This prepares Envoy for `--incompatible_load_proto_rules_from_bzl`.
See bazelbuild/bazel#8922

Signed-off-by: Yannic Bonenberger <contact@yannic-bonenberger.com>
Signed-off-by: Prakhar <prakhar_au@yahoo.com>
  • Loading branch information
Yannic authored and prakhag1 committed Jan 3, 2020
1 parent 1b5f79a commit 0fe272a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/bazel/api_build_system.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
load("@com_google_protobuf//:protobuf.bzl", _py_proto_library = "py_proto_library")
load("@com_envoyproxy_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc_proto_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@com_google_protobuf//:protobuf.bzl", _py_proto_library = "py_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_grpc_library", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_test")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load(
"//bazel:external_proto_deps.bzl",
"EXTERNAL_PROTO_CC_BAZEL_DEP_MAP",
Expand Down Expand Up @@ -108,7 +109,7 @@ def api_cc_py_proto_library(
linkstatic = 0,
has_services = 0):
relative_name = ":" + name
native.proto_library(
proto_library(
name = name,
srcs = srcs,
deps = deps + _COMMON_PROTO_DEPS,
Expand Down
2 changes: 2 additions & 0 deletions api/docs/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_proto//proto:defs.bzl", "proto_library")

licenses(["notice"]) # Apache 2

package_group(
Expand Down
1 change: 1 addition & 0 deletions bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ licenses(["notice"]) # Apache 2
# QUICHE platform APIs in //source/extensions/quic_listeners/quiche/platform/,
# should remain largely the same.

load("@rules_proto//proto:defs.bzl", "proto_library")
load(":genrule_cmd.bzl", "genrule_cmd")
load(
"@envoy//bazel:envoy_build_system.bzl",
Expand Down
1 change: 1 addition & 0 deletions source/common/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
licenses(["notice"]) # Apache 2

load("@rules_proto//proto:defs.bzl", "proto_library")
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_library",
Expand Down

0 comments on commit 0fe272a

Please sign in to comment.