Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Compiler exception running coverage: ClassNotFoundException: org.jacoco.agent.rt.internal_b0d6a23.Offline #5426
"bazel coverage" fails at 0.14.1 and 4001ddd with a compiler exception. It happens with and without
Here's the scenario:
Here's the full error:
It seems like coverage instrumentation should ignore java_plugin targets.
This is a follow-up of #4398
referenced this issue
Jun 19, 2018
Maybe those are interfering with jacoco?
It seems suspicious that the plugins are being instrumented at all, though. Do you expect instrumentation to be applied to host deps (like
IMO they should not be instrumented, but
@robfig Can you tell me more about the setup? I couldn't replicate yet. Do you have a
I think the key thing is that a java_plugin is included in the bazel coverage command. In this case, our i18n package exports a plugin to identify common errors in using it.
bazel coverage src/com/corp/util/... fails because "bazel coverage src/com/corpo/util/i18n/bugpatterns" fails.
Assuming I am correct, the proposed solution is to ignore java_plugin targets when instrumenting code, or filter them out entirely when running coverage.