-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Make grpc-java work with bazel HEAD #12241
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
base: master
Are you sure you want to change the base?
Conversation
Symbols such as java_* and ProtoInfo now must be loaded from their starlark equivalents.
For context, these changes will be necessary to make grpc-java work with Bazel 9. Bazel at HEAD requires these changes as well, as more and more legacy rules are removed from the bazel upstream codebase. It appears that grpc-java's dependencies on protobuf and rules_java, among others, are very out of date. This makes updating them tricky, especially in WORKSPACE, since the WORKSPACE setup for those two repos became slightly more complicated in the Bazel 7 -> 8 transition for a variety of technical reasons. See rules_android's example WORKSPACE for reference. |
Sigh, making this patch work will also require patching grpc itself, and touching its rather complicated dep setup macro (which seems to have implemented repo autoloads before that feature existed in Bazel). |
The old protobuf is on purpose, as that is the last version that supports protobuf-java 3.x. Protobuf 4.x is incompatible with some existing generated code and upgrading can prevent our users from upgrading to newer grpc versions. And yes, that is making a mess of things. When Bazel 9 is released we will be dropping Bazel 7 support, and Bazel 8 already requires protobuf-java 4.x, so Bazel users will be forced to stay on older Bazel versions at that point if they still have trouble, but grpc-java itself will move forward. rules_java is probably fine to upgrade.
Do you mean github.com/grpc/grpc? I've got a complicated set of changes in the works where I'm trying to avoid depending on envoy, because envoy is depending the newer protobufs that require protobuf-java 4.x. We copy code around and use jarjar to shade our copies. That might help here, as it reduces the dependencies. grpc/grpc would still be a dependency because of googleapis, but we'd no longer be needing to reference |
master...ejona86:grpc-java:bazel-jarjar is what is cooking. I don't know if the resulting jar is actually correct yet. |
Symbols such as java_* and ProtoInfo now must be loaded from their starlark equivalents.