Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more Bazel module dependencies #11767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 5 additions & 17 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,21 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
# GRPC_DEPS_END

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240326-1c8d509c5")
bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240819-fe8ba054a")
# CEL Spec may be removed when cncf/xds MODULE is no longer using protobuf 27.x
bazel_dep(name = "cel-spec", repo_name = "dev_cel", version = "0.15.0")
bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't upgrade protobuf beyond 23.1 for a good while yet because of the new protobuf-java major version (we support the newer version, but we need to support the older version too). So we can't use this dependency.

The same problem impacts the xds dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you won't be able to support Bazel 8+ which moved java rules to rules_java which in turn uses a newer Protobuf version and java proto rules to Protobuf itself which is also only available since a recent version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already tried compiling with Bazel 8 and didn't see any problem. If rules_java requires the newer Protobuf, then yeah, we can't use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long do you plan to support Protobuf v23 support?

bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.56.3.bcr.1")
bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58")
bazel_dep(name = "opencensus-proto", repo_name = "opencensus_proto", version = "0.4.1")
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1")
bazel_dep(name = "protoc-gen-validate", repo_name = "com_envoyproxy_protoc_gen_validate", version = "1.0.4.bcr.2")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_java", version = "5.3.5")
bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.46.0")
bazel_dep(name = "rules_jvm_external", version = "6.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")

non_module_deps = use_extension("//:repositories.bzl", "grpc_java_repositories_extension")

use_repo(
non_module_deps,
"com_github_cncf_xds",
"envoy_api",
)

grpc_repo_deps_ext = use_extension("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_repo_deps_ext")

use_repo(
grpc_repo_deps_ext,
"com_envoyproxy_protoc_gen_validate",
"opencensus_proto",
)
bazel_dep(name = "xds", repo_name = "com_github_cncf_xds", version = "0.0.0-20240423-555b57e")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

Expand Down
Loading