Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def _repository_impl(name, **kwargs):
# wants to override the version. Do nothing.
return

location = REPOSITORY_LOCATIONS[name]
loc_key = kwargs.pop("repository_key", name)
location = REPOSITORY_LOCATIONS[loc_key]

# Git tags are mutable. We want to depend on commit IDs instead. Give the
# user a useful error if they accidentally specify a tag.
Expand Down Expand Up @@ -489,8 +490,10 @@ def _com_google_protobuf():
# Needed for cc_proto_library, Bazel doesn't support aliases today for repos,
# see https://groups.google.com/forum/#!topic/bazel-discuss/859ybHQZnuI and
# https://github.com/bazelbuild/bazel/issues/3219.
location = REPOSITORY_LOCATIONS["com_google_protobuf"]
git_repository(name = "com_google_protobuf_cc", **location)
_repository_impl(
"com_google_protobuf_cc",
repository_key = "com_google_protobuf",
)
native.bind(
name = "protobuf",
actual = "@com_google_protobuf//:protobuf",
Expand Down