-
Notifications
You must be signed in to change notification settings - Fork 362
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
wanted: io_grpc_grpc_java #353
Comments
Do we really need grpc-java as a Bazel module, or should Bazel users just fetch the jar dependencies via rules_jvm_external? |
Yes, I think we do, because it has the |
Another resolution for this is to relocate the |
Yes, I would also like to see the Bazel APIs to be moved out of grpc-java if they are not getting well maintained there. |
GRPC-related things feel like a better fit for one of the (many) grpc providing rulesets. |
Do you have a recommendation of which one? None of them are canonical and last time the SIG touched this in https://bazel-contrib.github.io/SIG-rules-authors/proto-grpc.html we just made a spreadsheet because things were so confusing. |
I am currently keeping the rules roughly in-sync with those inside Google for Blaze. The story may be different for other languages, but for Java there's been no change to the rule support. Bzlmod is a different discussion. It looks invasive and a repeated cost as we make releases. So it would take some concerted effort to figure out what the heck is going on and what will be necessary going forward. We accept PRs for new stuff, and maintain what is there already. A PR isn't a sure win, but it generally does make things more clear as to what is going on. I don't see the point of forking if you haven't tried a PR upstream yet.
Given you would still need the protoc plugin, which is a native C++ binary, I don't think rules_jvm_external is much of a solution. You would still need the cc_binary from the grpc-java repository. |
I've been maintaining a private fork implementing pretty much this concept. I had a completely different reason to do this: the A few subtle things I learned from this exercise:
While not a bzlmod module today, I think it would be pretty trivial to convert what I have into one - aside from the ruleset it just references prebuilt assets from Maven Central.
There are prebuilt versions of the http_file(
name = "protoc-gen-grpc-java-{platform}".format(platform = platform),
executable = True,
sha256 = sha256,
urls = [
"https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/{version}/protoc-gen-grpc-java-{version}-{platform}.exe".format(
version = version,
platform = platform,
),
],
)
I'm interested in making grpc-java work for bzlmod consumers, and I'd prefer to do that in coordination with upstream. But as I see it, because of issues relating to version resolution mentioned above, having the ruleset live in the same repository as the sourcecode for the JARs is a net negative; an easy protection against aliasing between from-source and Maven-published artifacts is to just not make the sources available in the first place. For that reason, I'd like to see this hosted in a new repo rather than having it be a PR against the existing I am also somewhat concerned about the toil associated with releases; my current workflow is partially manual. It takes a few minutes to do now that I've figured out what needs doing, which is fine for the couple times a year my project updates its version of this dependency, but is a bit much for the couple times a month grpc-java cuts a release. I believe this is a scriptable task, and I've been tinkering on one although I don't have anything working so far. |
These are in the same PR since they have a circular dependency on each other Fixes: bazelbuild#353 Fixes: bazelbuild#1113
Module location
https://github.com/grpc/grpc-java
Link to bzlmod issue in the module's repository
grpc/grpc-java#9559
The text was updated successfully, but these errors were encountered: