Gergely Fábián
Gergely Fábián
I believe this is a bug on Jacoco. Looking at the implementation of the synthetic Lambda fix in Jacoco (https://github.com/jacoco/jacoco/pull/232/files) it seems there is a filter on lambda names, that...
Current master of Jacoco seems to have support for Scala lambdas: https://github.com/jacoco/jacoco/blob/6bcce6972b8939d7925c4b4d3df785d9a7b00007/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java This was fixed in https://github.com/jacoco/jacoco/pull/912 and then later improved in https://github.com/jacoco/jacoco/pull/922. Both changes are part of 0.8.5 release...
I'm having hard time to try out this new Jacoco version, so it's simply theory I wrote about, before I'd have some hard proof that indeed this new Jacoco version...
I tried outside of Bazel... Inspiration is coming from https://github.com/jacoco/jacoco/issues/885#issuecomment-494388663. I've downloaded http://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.5/jacoco-0.8.5.zip and http://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.3/jacoco-0.8.3.zip. Modified `test/coverage/D1.scala` to add a main method to it: ``` def main(args: Array[String]) { D1.veryLongFunctionNameIsHereAaaaaaaaa()...
> Issue is vague because we're not really sure what happened. > When running our coverage test on 2.12 we found that the coverage file changed. > When we compared...
> Thanks! > Well done! 👍🏽 > Can’t we control the jacoco version ourselves? AFK but that sounds strange In Bazel itself Jacoco version is in: `third_party/java/jacoco/BUILD` seems to be...
CC: @iirina, what do you think, is there any other way to fix this issue, than upgrading Jacoco in Bazel to 0.8.5?
Opened an issue on Bazel to upgrade Jacoco to 0.8.5: https://github.com/bazelbuild/bazel/issues/11674
I have the workaround for this issue. It can be fixed by using jacocorunner property of java_toolchain. Example project: https://github.com/gergelyfabian/bazel-scala-example/tree/jacoco_coverage_fix Steps so far: 1. Check out https://github.com/gergelyfabian/jacoco/tree/0.8.3-scala-lambda-fix (has the Scala...
Discussing workarounds for the rules_scala part of the issue (in #1163 and #1166).