Skip to content

Commit

Permalink
Update Bazel dependencies on GRPC and protoc_gen_validate (#7115)
Browse files Browse the repository at this point in the history
They include fixes for future Bazel changes. In particular, the
repository can now build with --incompatible_depset_is_not_iterable,
which will be included in Bazel 0.27.

Description:
Risk Level: low
Testing: bazel build --nobuild ... --incompatible_depset_is_not_iterable

#6995

Signed-off-by: Laurent Le Brun <laurentlb@gmail.com>
  • Loading branch information
laurentlb authored and htuch committed May 31, 2019
1 parent 40d8b7f commit 0739cd6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions api/bazel/api_build_system.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
load("@com_lyft_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc_proto_library")
load("@com_envoyproxy_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc_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")

Expand Down Expand Up @@ -30,7 +30,7 @@ def api_py_proto_library(name, srcs = [], deps = [], has_services = 0):
default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@com_google_protobuf//:protoc",
deps = [_LibrarySuffix(d, _PY_SUFFIX) for d in deps] + [
"@com_lyft_protoc_gen_validate//validate:validate_py",
"@com_envoyproxy_protoc_gen_validate//validate:validate_py",
"@googleapis//:api_httpbody_protos_py",
"@googleapis//:http_api_protos_py",
"@googleapis//:rpc_status_protos_py",
Expand All @@ -52,7 +52,7 @@ def api_go_proto_library(name, proto, deps = []):
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
"@com_lyft_protoc_gen_validate//validate:go_default_library",
"@com_envoyproxy_protoc_gen_validate//validate:go_default_library",
"@googleapis//:rpc_status_go_proto",
],
)
Expand All @@ -69,7 +69,7 @@ def api_go_grpc_library(name, proto, deps = []):
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
"@com_lyft_protoc_gen_validate//validate:go_default_library",
"@com_envoyproxy_protoc_gen_validate//validate:go_default_library",
"@googleapis//:http_api_go_proto",
],
)
Expand Down Expand Up @@ -112,7 +112,7 @@ def api_proto_library(
"@googleapis//:http_api_protos_proto",
"@googleapis//:rpc_status_protos_lib",
"@com_github_gogo_protobuf//:gogo_proto",
"@com_lyft_protoc_gen_validate//validate:validate_proto",
"@com_envoyproxy_protoc_gen_validate//validate:validate_proto",
],
visibility = visibility,
)
Expand Down
2 changes: 1 addition & 1 deletion api/bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def api_dependencies():
locations = REPOSITORY_LOCATIONS,
)
envoy_http_archive(
"com_lyft_protoc_gen_validate",
"com_envoyproxy_protoc_gen_validate",
locations = REPOSITORY_LOCATIONS,
)
envoy_http_archive(
Expand Down
10 changes: 5 additions & 5 deletions api/bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ GOGOPROTO_SHA256 = "99e423905ba8921e86817607a5294ffeedb66fdd4a85efce5eb2848f715f
OPENCENSUS_RELEASE = "0.1.0"
OPENCENSUS_SHA256 = "4fd21cc6de63d7cb979fd749d8101ff425905aa0826fed26019d1c311fcf19a7"

PGV_RELEASE = "0.0.14"
PGV_SHA256 = "c45e629e8c174886a73ec251b94d5470526c7c1e2596cf17755065aed15b9254"
PGV_GIT_SHA = "26db5cb7c01a67c6a2e21a832106406185530b2f"
PGV_SHA256 = "6510cbcf69d99059c652ae2376f6240bc761d0b019cd962225f4f609be361e26"

GOOGLEAPIS_GIT_SHA = "d642131a6e6582fc226caf9893cb7fe7885b3411" # May 23, 2018
GOOGLEAPIS_SHA = "16f5b2e8bf1e747a32f9a62e211f8f33c94645492e9bbd72458061d9a9de1f63"
Expand All @@ -23,10 +23,10 @@ REPOSITORY_LOCATIONS = dict(
sha256 = BAZEL_SKYLIB_SHA256,
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/" + BAZEL_SKYLIB_RELEASE + "/bazel-skylib." + BAZEL_SKYLIB_RELEASE + ".tar.gz"],
),
com_lyft_protoc_gen_validate = dict(
com_envoyproxy_protoc_gen_validate = dict(
sha256 = PGV_SHA256,
strip_prefix = "protoc-gen-validate-" + PGV_RELEASE,
urls = ["https://github.com/envoyproxy/protoc-gen-validate/archive/v" + PGV_RELEASE + ".tar.gz"],
strip_prefix = "protoc-gen-validate-" + PGV_GIT_SHA,
urls = ["https://github.com/envoyproxy/protoc-gen-validate/archive/" + PGV_GIT_SHA + ".tar.gz"],
),
googleapis = dict(
# TODO(dio): Consider writing a Skylark macro for importing Google API proto.
Expand Down
7 changes: 4 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/gperftools/gperftools/archive/fc00474ddc21fff618fc3f009b46590e241e425e.tar.gz"],
),
com_github_grpc_grpc = dict(
sha256 = "ba8b08a697b66e14af35da07753583cf32ff3d14dcd768f91b1bbe2e6c07c349",
strip_prefix = "grpc-1.20.1",
urls = ["https://github.com/grpc/grpc/archive/v1.20.1.tar.gz"],
sha256 = "bcb01ac7029a7fb5219ad2cbbc4f0a2df3ef32db42e236ce7814597f4b04b541",
strip_prefix = "grpc-79a8b5289e3122d2cea2da3be7151d37313d6f46",
# Commit from 2019-05-30
urls = ["https://github.com/grpc/grpc/archive/79a8b5289e3122d2cea2da3be7151d37313d6f46.tar.gz"],
),
com_github_luajit_luajit = dict(
sha256 = "409f7fe570d3c16558e594421c47bdd130238323c9d6fd6c83dedd2aaeb082a8",
Expand Down
2 changes: 1 addition & 1 deletion tools/protodoc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ py_binary(
srcs = ["protodoc.py"],
visibility = ["//visibility:public"],
deps = [
"@com_envoyproxy_protoc_gen_validate//validate:validate_py",
"@com_google_protobuf//:protobuf_python",
"@com_lyft_protoc_gen_validate//validate:validate_py",
],
)

0 comments on commit 0739cd6

Please sign in to comment.