diff --git a/proto/private/dependencies.bzl b/proto/private/dependencies.bzl index e04d02c..d5dd5a6 100644 --- a/proto/private/dependencies.bzl +++ b/proto/private/dependencies.bzl @@ -21,14 +21,13 @@ dependencies = { ], }, "com_google_protobuf": { - "sha256": "cc0d00955a9eb63f507b5b35367b96b75f9833602377a84ac2bc726eacac0ea1", - "strip_prefix": "protobuf-c132a4aa165d8ce2b65af62d4bde4a7ce08d07c3", + "sha256": "36bda141a127e8b8fb43f93b49efb474200ac857a9ad9a08df8aebcaba8c4543", + "strip_prefix": "protobuf-ee4f2492ea4e7ff120f68a792af870ee30435aa5", "urls": [ # TODO(yannic): Update to release that contains fixes for # `--incompatible_load_{cc,java,proto,python}_rules_from_bzl`. - # TODO(yannic): Update when protocolbuffers/protobuf/6391 is merged. - "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/c132a4aa165d8ce2b65af62d4bde4a7ce08d07c3.tar.gz", - "https://github.com/protocolbuffers/protobuf/archive/c132a4aa165d8ce2b65af62d4bde4a7ce08d07c3.tar.gz", + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/ee4f2492ea4e7ff120f68a792af870ee30435aa5.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/ee4f2492ea4e7ff120f68a792af870ee30435aa5.tar.gz", ], }, # Dependency of `com_google_protobuf`. @@ -59,6 +58,14 @@ dependencies = { ], }, # Dependency of `com_google_protobuf`. + "six": { + "sha256": "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", + "build_file": "@com_google_protobuf//:third_party/six.BUILD", + "urls": [ + "https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz", + ], + }, + # Dependency of `com_google_protobuf`. "zlib": { "build_file": "@com_google_protobuf//:third_party/zlib.BUILD", "sha256": "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", diff --git a/proto/repositories.bzl b/proto/repositories.bzl index fad5945..5d54e60 100644 --- a/proto/repositories.bzl +++ b/proto/repositories.bzl @@ -14,16 +14,11 @@ load("//proto/private:dependencies.bzl", "dependencies") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def rules_proto_dependencies(): for name in dependencies: - if name in native.existing_rules(): - continue - - http_archive( - name = name, - **dependencies[name] - ) + maybe(http_archive, name, **dependencies[name]) def rules_proto_toolchains(): # Nothing to do here (yet).