You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found instances where, when using --classfiles to point to a JAR, --excludeAnnotation does not work completely and some code that should be excluded still appear to be covered.
When the same command line have --classfiles pointing to a folder, when the JAR was unpacked, the filtering works reliably.
Example of command line invocation : java -jar /Users/oliviern/.devxp/import-cache/4b81c0960d39ddd828f97e31aee273bf0d929d87/3c34899b72c05e31efaa6ed042ad0527573034a1/kover-cli-0.8.2.jar @bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_metadata.txt --xml bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_report.xml --html /Users/oliviern/Uber/android/bazel-testlogs/libraries/foundation/ui/ui-compose-ambients/test_release/coverage_report
content of bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_metadata.txt:
@oliviernotteghem Could you please look into the bytecode of the class inside jar, and check that the annotation is present there?
Unpack the jar, and then use javap -v -l -p <path-to-class>.class to see the bytecode. The target method should have the annotation.
While testing, I found out that ProGuard removed RetentionPolicy.CLASS annotation in my case, maybe it is something similar in your case
We found instances where, when using --classfiles to point to a JAR, --excludeAnnotation does not work completely and some code that should be excluded still appear to be covered.
When the same command line have --classfiles pointing to a folder, when the JAR was unpacked, the filtering works reliably.
Example of command line invocation :
java -jar /Users/oliviern/.devxp/import-cache/4b81c0960d39ddd828f97e31aee273bf0d929d87/3c34899b72c05e31efaa6ed042ad0527573034a1/kover-cli-0.8.2.jar @bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_metadata.txt --xml bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_report.xml --html /Users/oliviern/Uber/android/bazel-testlogs/libraries/foundation/ui/ui-compose-ambients/test_release/coverage_report
content of bazel-bin/libraries/foundation/ui/ui-compose-ambients/test_release-kover_metadata.txt:
example of code failing to be filtered out:
The text was updated successfully, but these errors were encountered: