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
Support for passing extra compiler options #12790
Comments
Is the E.g.
|
The question is specifically about We have a few large proto files that are expensive (>10s) to build, and running errorprone increases the compilation time by about 50%. We expect errorprone to be pointless for such generated code, as well, so this extra time is entirely wasted. I did find a workaround by digging through Bazel internals: java_toolchain(
name = "toolchain_java8",
compatible_javacopts = {
"proto": ["-XepDisableAllChecks"],
},
...
} This seems to do exactly what we want, so it'll do for now. However, it'd obviously be preferable to have an officially-supported way to do this rather than relying on an internal flag. |
I believe the response in #3427 (comment) should be the preferred way to do this and that it supports your usecase. |
Unless I am misunderstanding, I don't believe that option would work for us without substantial reorganization unfortunately. We do not put protobuf libraries in separate Bazel packages; they exist side-by-side with code, so package-level configuration wouldn't be sufficient. |
Echoing the need for a way to allow customization of javac options on We use |
Would it be possible to support passing additional compiler options to java_proto_library like in https://docs.bazel.build/versions/master/be/java.html#java_library_args
We find it useful to pass Error-Prone's -XepDisableAllChecks while generating Java code for protos, but haven't figured out how since switching to rules_java.
The text was updated successfully, but these errors were encountered: