-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
4.0 breaking change: Java coverage #12793
Comments
Toolchains defined in java_tools all have jacoco set. @alexeagle could you provide more details about autoconfiguration that you're mentioning? Are you using bazel-toolchains? Just using default_java_toolchain target I cannot reproduce the error. |
In such case jacoco runner was not set on the java_toolchain. Issue bazelbuild#12793
@comius thanks for looking, my repro is pretty simple:
I see that if I comment out |
AFAICT we don't need these java_toolchain override lines in the .bazelrc for this repo. I'll confirm that our upgrade is unblocked, and then I think the severity here is probably low (unless you know of a reason other Bazel users might need to select those toolchains from bazel_tools) |
Thanks for reproduction. I'm confirming the bug as well as that the PR fixes it. @alexeagle Do you also have reproduction for the |
…2801) * Fix coverage support when using default_java_toolchain. In such case jacoco runner was not set on the java_toolchain. Issue bazelbuild#12793 * Additional coverage test for predefined toolchains. * Revert "Additional coverage test for predefined toolchains." This reverts commit da3f7fd.
I'm not sure if there is a bug, or if this is just missing documentation (and if such documentation would be in the 4.0 release)
It seems that 4.0 introduces a breaking change for
bazel coverage
on Java targets, where the jacocorunner must now be configured in a toolchain. The default auto-discovered toolchain does not have one set, and after some digging I have not been able to create my own.Every attempt to make a
default_java_toolchain
gives me an error like this:Is it expected that users need to create their own java_toolchain to keep coverage working? If so, how?
The text was updated successfully, but these errors were encountered: