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

Use more Bazel module dependencies #11767

wants to merge 1 commit into from

Conversation

mering
Copy link
Contributor

@mering mering commented Dec 20, 2024

This allows bzlmod version resolution and avoids ODR violations when importing the same dependency multiple times in different modules.

@mering
Copy link
Contributor Author

mering commented Dec 20, 2024

Looks like Label().repo_name was only introduced in Bazel 7.1. Can we bump the version?

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

We can upgrade the CI to Bazel 7.1, but the failure looks to be because of envoy_api and we can't use that dependency anyway.

# 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants