Skip to content

Commit

Permalink
bazel: Use com_google_protobuf instead of com_google_protobuf_javalite
Browse files Browse the repository at this point in the history
Since Bazel 6 [1], Bazel has used com_google_protobuf for javalite. We
only used the other repo because Bazel expected it, which was because
Protobuf split out javalite to a separate branch for a while. Since
everything is now reunified, we can use a singular protobuf repo.

1. bazelbuild/bazel@abdb1d6
  • Loading branch information
ejona86 committed Jul 24, 2024
1 parent 5ec0187 commit 7a25e68
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ use_repo(
non_module_deps,
"com_github_cncf_xds",
"envoy_api",
"com_google_protobuf_javalite",
)

grpc_repo_deps_ext = use_extension("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_repo_deps_ext")
Expand Down
13 changes: 1 addition & 12 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS = {
"com.google.protobuf:protobuf-java": "@com_google_protobuf//:protobuf_java",
"com.google.protobuf:protobuf-java-util": "@com_google_protobuf//:protobuf_java_util",
"com.google.protobuf:protobuf-javalite": "@com_google_protobuf_javalite//:protobuf_javalite",
"com.google.protobuf:protobuf-javalite": "@com_google_protobuf//:protobuf_javalite",
"io.grpc:grpc-alts": "@io_grpc_grpc_java//alts",
"io.grpc:grpc-api": "@io_grpc_grpc_java//api",
"io.grpc:grpc-auth": "@io_grpc_grpc_java//auth",
Expand Down Expand Up @@ -107,8 +107,6 @@ def grpc_java_repositories(bzlmod = False):
)
if not bzlmod and not native.existing_rule("com_google_protobuf"):
com_google_protobuf()
if not native.existing_rule("com_google_protobuf_javalite"):
com_google_protobuf_javalite()
if not bzlmod and not native.existing_rule("com_google_googleapis"):
http_archive(
name = "com_google_googleapis",
Expand Down Expand Up @@ -153,15 +151,6 @@ def com_google_protobuf():
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz"],
)

def com_google_protobuf_javalite():
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
http_archive(
name = "com_google_protobuf_javalite",
sha256 = "9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42",
strip_prefix = "protobuf-25.1",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz"],
)

def io_grpc_grpc_proto():
http_archive(
name = "io_grpc_grpc_proto",
Expand Down

0 comments on commit 7a25e68

Please sign in to comment.