Gergely Fábián
Gergely Fábián
Here is the reproduction: https://github.com/gergelyfabian/bazel-scala-example/blob/rules_scala_1291/example-maven/src/main/scala/mypackage/Maven.scala I think it's the following construct that leads Jacoco to run a Kotlin when filter on the Scala code: ``` literal match { case s...
Unfortunately reverting rules_scala to 67a7ac1 is not a solution. As I just discovered in that case there are no coverage metrics produced (maybe coverage is not called then at all?)....
It seems this issue is specific to Scala 2.13. If I revert in my test branch (rules_scala_1291) the commit that upgraded to Scala 2.13 (git revert 46b97007f37b590833d6cd017ed628db387798b7), then with Scala...
Uploaded a new branch to: https://github.com/gergelyfabian/bazel-scala-example/tree/jacoco_coverage_fix_new, this does jacocorunner change properly (using current rules_scala master). Created new branch that includes both the reproduction of the problem in this issue and...
Fix/workaround is in branches: * https://github.com/gergelyfabian/jacoco/tree/0.8.3-scala-lambda-fix * https://github.com/gergelyfabian/jacoco/tree/0.8.3-scala * https://github.com/gergelyfabian/jacoco/tree/kotlin-when-filter-not-for-scala The first branch is automatically used in rules_scala's `scripts/build_jacocorunner/build_jacocorunner.sh` script, so you should have it if you use the built...
According to the discussion in https://github.com/jacoco/jacoco/pull/1224 it will be enough to backport https://github.com/jacoco/jacoco/pull/942 in the custom 0.8.3 branches that I use to fix this issue (I have tested that, and...
Updated branches: * https://github.com/gergelyfabian/jacoco/tree/0.8.3-scala-lambda-fix * https://github.com/gergelyfabian/jacoco/tree/0.8.3-scala The fix is in version 0.8.5 of jacoco, so any Bazel upgrade that will upgrade Jacoco to 0.8.5+ will fix this problem. Till that...
I checked with Bazel 5.0.0-pre.20210913.1 (updated in .bazelversion), and it passes without custom jacoco.
I think why it's passing is because on Bazel master Jacoco has been upgraded to 0.8.6 (includes a lot of useful fixes).
Thanks @amit-traiana for the directions on a possible workaround. I'm posting my workaround here, using `rules-proto-grpc`, if anyone was wondering in the future how to solve this (outside of `rules_scala`):...