diff --git a/README.md b/README.md index c737b7ee3..fec02cbf7 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,13 @@ load( ) apple_support_dependencies() + +load( + "@com_google_protobuf//:protobuf_deps.bzl", + "protobuf_deps", +) + +protobuf_deps() ``` The `swift_rules_dependencies` macro creates a toolchain appropriate for your diff --git a/WORKSPACE b/WORKSPACE index 92ae4b826..1a69e873e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -13,3 +13,10 @@ load( ) apple_support_dependencies() + +load( + "@com_google_protobuf//:protobuf_deps.bzl", + "protobuf_deps", +) + +protobuf_deps() diff --git a/swift/repositories.bzl b/swift/repositories.bzl index 7df164ae8..804ce7e37 100644 --- a/swift/repositories.bzl +++ b/swift/repositories.bzl @@ -88,30 +88,13 @@ def swift_rules_dependencies(): _maybe( http_archive, name = "com_google_protobuf", - # v3.7.1, latest as of 2019-04-03 - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.7.1.zip"], - sha256 = "f976a4cd3f1699b6d20c1e944ca1de6754777918320c719742e1674fcf247b7e", - strip_prefix = "protobuf-3.7.1", + # v3.8.0, latest as of 2019-05-28 + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.8.0.zip"], + sha256 = "1e622ce4b84b88b6d2cdf1db38d1a634fe2392d74f0b7b74ff98f3a51838ee53", + strip_prefix = "protobuf-3.8.0", type = "zip", ) - # TODO(https://github.com/protocolbuffers/protobuf/issues/5918): - # Remove this when protobuf releases protobuf_deps.bzl and instruct users to call - # `protobuf_deps()` instead. - if not native.existing_rule("net_zlib"): - http_archive( - name = "net_zlib", - build_file = "@com_google_protobuf//examples:third_party/zlib.BUILD", - sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", - strip_prefix = "zlib-1.2.11", - urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], - ) - - native.bind( - name = "zlib", - actual = "@net_zlib//:zlib", - ) - _maybe( swift_autoconfiguration, name = "build_bazel_rules_swift_local_config", diff --git a/third_party/com_github_grpc_grpc_swift/BUILD.overlay b/third_party/com_github_grpc_grpc_swift/BUILD.overlay index 70a7021be..ac74a7dab 100644 --- a/third_party/com_github_grpc_grpc_swift/BUILD.overlay +++ b/third_party/com_github_grpc_grpc_swift/BUILD.overlay @@ -52,7 +52,7 @@ cc_library( tags = ["swift_module=CgRPC"], deps = [ ":BoringSSL", - "//external:zlib", + "@zlib//:zlib", ], )