-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add jacocorunner to java_toolchain. #8378
Conversation
6180000
to
95d8fcf
Compare
Looks OK. Can you add a test, or migrate existing tests to use the new attribute? |
Actually we don't have any open-sourced tests for java_toolchain. I opened #8404 to keep track of open sourcing the tests. For now I added the |
@hlopko Can you take a look today? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! \o/
This broke in 33f7b77, as the new code path was not handling this case correctly. Fixes bazelbuild#8402. PiperOrigin-RevId: 249201968
ed44034
to
9f4a0da
Compare
9f4a0da
to
5e7ad2f
Compare
Also enable jacocorunner in BUILD.java_tools since #8378 is now merged. RELNOTES: None. PiperOrigin-RevId: 249442764
The jacoco runner was previously retrieved via an implicit attribute `$jacocorunner` on the `java_binary` and `java_test` rules. Retrieving the runner via the implicit attribute makes testing the tools in the `java_tools` release difficult and inconsistent (almost all other tools are defined via `java_toolchain`). This PR makes `jacocorunner` part of `java_toolchain`. If `jacocorunner` is not found in the toolchain it falls back to the `$jacocorunner` attribute. The fallback behavior can be removed after a bazel release with this change. Closes bazelbuild#8378. PiperOrigin-RevId: 249241175
BranchDetailAnalyzer should have also been updated as part of bazelbuild@ff1f745 when the jacoco version in bazel was updated. Changes like this will be avoided after bazelbuild#8378 is merged, because it enables testing with the java coverage tools at head. Closes bazelbuild#8417. PiperOrigin-RevId: 249400130
Also enable jacocorunner in BUILD.java_tools since bazelbuild#8378 is now merged. RELNOTES: None. PiperOrigin-RevId: 249442764
The jacoco runner was previously retrieved via an implicit attribute
$jacocorunner
on thejava_binary
andjava_test
rules. Retrieving the runner via the implicit attribute makes testing the tools in thejava_tools
release difficult and inconsistent (almost all other tools are defined viajava_toolchain
).This PR makes
jacocorunner
part ofjava_toolchain
. Ifjacocorunner
is not found in the toolchain it falls back to the$jacocorunner
attribute. The fallback behavior can be removed after a bazel release with this change.