rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

`--instrumentation_filter` does not work for scala coverage

Open liucijus opened this issue 4 years ago • 4 comments

Repro: https://github.com/sjoerdvisscher/bazel-scala-tests bazel coverage //... --instrumentation_filter=-java removes java, but bazel coverage //... --instrumentation_filter=-scala has scala

Repro also demonstrates #1101

Thanks @sjoerdvisscher for reporting

liucijus avatar Dec 14 '20 07:12 liucijus

Is there any workaround for this?

My workaround so far it to take the combined report and extract data from it with lcov -e to take only files that weren't tests.

gergelyfabian avatar Nov 25 '21 11:11 gergelyfabian

Is cd556ccfc253bfd70659631079e39be412b5402d a fix for this bug?

gergelyfabian avatar Apr 27 '22 11:04 gergelyfabian

After upgrading to the newest rules_scala (de3d3a772e2fd443bcd662c740f5f8e916e4b6f0) instrumentation_filter seems to be working for my use-case (test targets are properly removed from the output).

gergelyfabian avatar Apr 27 '22 12:04 gergelyfabian

https://github.com/sjoerdvisscher/bazel-scala-tests would need an update, it breaks when upgrading rules_scala to the newest version, so I could not check it there, but I believe it should be working when scala targets are excluded.

gergelyfabian avatar Apr 27 '22 12:04 gergelyfabian