-
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
Add JaCoCo to v0.8.9-SNAPSHOT and remove v0.8.7 #17836
Add JaCoCo to v0.8.9-SNAPSHOT and remove v0.8.7 #17836
Conversation
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.
Based on #16412 (comment), I think we should try removing the remaining patch at this point.
Would you be willing to update this to use the published 0.8.9-SNAPSHOT release and delete the patch, instead of rebuilding with it applied?
18321e3
to
ce22ff1
Compare
This PR removes the patch, confirmed this works against a test project with updated java tools |
Merged at 11dc7de |
Related to bazelbuild#16412 Partial commit for third_party/*, see bazelbuild#17836. Signed-off-by: Sunil Gowroji <sgowroji@google.com>
The Jacoco snapshot of Bazel is from 30/03/2023, but the current snapshot available is from 31/03/2023. This difference in build dates is causing issues because our tests with coverage are running with the 0.8.9-snapshot(31/03), while Bazel is weaving the classes using a Jacoco agent from the 30/03 snapshot. This mismatch is leading to a bug, because the hash in org.jacoco.agent.rt.internal_(hash) is dependent on the Jacoco agent build. Is there a way to downgrade in runtime to 0.8.8 version of Jacoco in my local project, or to align the Bazel environment with the current snapshot? |
Can you file a bug for this? Probably we should update Bazel to a newer non snapshot Jacobo release |
I was able to do a workaround downloading the jacoco used in bazel and creating a lib for it: // BUILD.bazel
//libs/jacoco/jacocoagent-0.8.9-SNAPSHOT.jar And use it like this in the weaving:
The error was: /private/var/tmp/_bazel_davidvieira/52af286067236843f81b50b2c41f19c6/execroot/mono/bazel-out/darwin_arm64-fastbuild/bin/[OMITTED]/identity/libidentity-raw.jar [error] can't determine superclass of missing type org.jacoco.agent.rt.internal_43a39aa.Offline |
In newer versions of Bazel, we already have a non-snapshot version of Jacoco. I think we are fine, at least we have a workaround for now, before updating Bazel. Thank you 🙏 |
Related to #16412
PR 1 of 3 as described in README