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
New Kotlin IR Compiler Backend breaks generated code filter #1086
Comments
@Grisu118 if there is a change in the bytecode generated by Kotlin compiler, then why don't you report this to developers of compiler ? 😉 CC @qwwdfsad @Alefas @antonarhipov For example for
after execution of
which was not the case before and is not the case in the absence of Using our validation tests one can observe other changes in how the Kotlin compiler generates bytecode: --- c/org.jacoco.core.test.validation.kotlin/pom.xml
+++ w/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -26,7 +26,7 @@
<properties>
<bytecode.version>6</bytecode.version>
- <kotlin.version>1.3.61</kotlin.version>
+ <kotlin.version>1.4.0</kotlin.version>
</properties>
<dependencies>
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
- <version>1.0.1</version>
+ <version>1.3.9</version>
</dependency>
</dependencies>
@@ -60,6 +60,11 @@
<goals>
<goal>compile</goal>
</goals>
+ <configuration>
+ <args>
+ <arg>-Xuse-ir</arg>
+ </args>
+ </configuration>
</execution>
</executions>
</plugin> |
I'll investigate it on our side |
We'll consider it a bug for now: https://youtrack.jetbrains.com/issue/KT-41903 Also, we (again) discussed a potential solution for coverage and bytecode processing tools and decided to experiment with |
@qwwdfsad first of all thanks a lot! ❤️
As of today title is "JVM IR: do not generate LineNumberTable in auto-generated members of data classes",
😉 for another example for the following
execution of
shows
but execution with
shows that
|
Thanks, it is also being fixed :) https://youtrack.jetbrains.com/issue/KT-41960 |
Jacoco 0.8.2 introduced filtering of generated methods in kotlin (#689).
When I use the kotlin 1.4.0 with the new IR Compiler Backend, the filters do not work. You find below the example from above pull request updated to kotlin 1.4.0. With a comment where you can enable / disable the new compiler backend.
Steps to reproduce
JaCoCo version: 0.8.5
Operating system: Windows 10
Tool integration: Gradle 6.6
Complete executable reproducer: example.zip
Steps:
gradlew clean jacocoTestReport
Expected behaviour
Generated methods are excluded, like with
useIR = false
Actual behaviour
Generated methods are not excluded, with
useIR = true
The text was updated successfully, but these errors were encountered: