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

Custom java_toolchain conflicting with protobuf's :java_toolchain #3757

Closed
ejona86 opened this issue Sep 18, 2017 · 6 comments
Closed

Custom java_toolchain conflicting with protobuf's :java_toolchain #3757

ejona86 opened this issue Sep 18, 2017 · 6 comments
Labels
area-java-toolchains javabase, java_toolchain flags, JDK selection, java_toolchain rules, java_tools repository more data needed P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request

Comments

@ejona86
Copy link

ejona86 commented Sep 18, 2017

We (gRPC) have a user that is using a custom java_toolchain that fails the build on warnings. The Bazel protobuf integration compiles google/protobuf from source, which currently triggers some warnings. So the user is unable to use their java_toolchain with gRPC/protobuf and was wanting gRPC/protobuf to use pre-built JARs instead of from-source compilation.

How should first-class Java dependencies be handled in Bazel?

More information can be found at grpc/grpc-java#3412

CC @pgr0ss @buchgr @cgrushko

@cgrushko
Copy link
Contributor

Bazel protobuf integration compiles google/protobuf from source

Not exactly - it takes whatever label you give it in --proto_compiler and "builds" it. If it's a precompiled binary there won't be any compilation.

So a trivial solution is to build the proto compiler (either with Bazel or whatever) and check-in the binary.
The harder solution is to complain to github.com/google/protobuf.

I'm unaware of a mechanism to suppress warnings from external repositories, though there might be; perhaps file a separate issue about that?

@hlopko hlopko added category: rules > java P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request labels Oct 10, 2017
@hlopko
Copy link
Member

hlopko commented Oct 10, 2017

Did anybody talk to the protobuf people?

@drigz
Copy link
Contributor

drigz commented Apr 19, 2018

This has been fixed (protocolbuffers/protobuf#4220) but has not been ported from master into the 3.5.x branch, so I guess we can wait for 3.6.0 or use HEAD.

@rockwotj
Copy link
Contributor

@cgrushko --proto_compiler doesn't actually fix the problem due to #8485

@jin jin added team-Rules-Java Issues for Java rules and removed category: rules > java labels Apr 15, 2020
@comius comius added area-java-toolchains javabase, java_toolchain flags, JDK selection, java_toolchain rules, java_tools repository P2 We'll consider working on this in future. (Assignee optional) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Nov 21, 2020
comius added a commit to comius/bazel_issue_3757 that referenced this issue Jan 14, 2021
@comius
Copy link
Contributor

comius commented Jan 14, 2021

I created a reproduction described in grpc/grpc-java#3412, here: https://github.com/comius/bazel_issue_3757.

It compiles without any warnings on bazel 3.7.2.

@comius comius added more data needed P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed P2 We'll consider working on this in future. (Assignee optional) labels Jan 14, 2021
@comius
Copy link
Contributor

comius commented Oct 6, 2021

There was no response for "more data needed". I'm closing the issue.

@comius comius closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-java-toolchains javabase, java_toolchain flags, JDK selection, java_toolchain rules, java_tools repository more data needed P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request
Projects
None yet
Development

No branches or pull requests

8 participants