-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JUnit Jupiter breaks on Kotlin 1.9.0 / GraalVM native #6957
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
Comments
error log: error-log-full.txt |
Hi, Thank you for reporting this issue, could you please specify the output of |
@oubidar-Abderrahim i've tried with EE 22.3.1, GraalVM 20. see below for both version outputs. i have not yet tried with snapshot builds EE 22.3.1:
Latest (GVM 20):
|
according to the Kotlin team this is caused by a new language feature called They think this is a bug in Graal, what's your opinion on that and what do you recommend as a fix? Explicitly listing all Kotlin Enums via |
It affects all library which dependent to |
hey @oubidar-Abderrahim, could you please comment on this issue? it currently blocks us from updating our projects to more recent kotlin versions and it would be great to know if there is something we're supposed to do or if it's considered a bug in graalvm or kotlin (in which case we would reach out to jetbrains again). |
cc @dnestoro (GR 47593) |
This will likely not be a problem with GraalVM versions after Java 21. The culprit class is not stored in the image heap so its initialization during JUnit initialization should not be a problem. Note that with GraalVM 21 we need to add the I'm looking forward to seeing if it works out. |
@vjovanov Thanks for the update. Can you maybe clarify what exactly you meant with "after Java 21"? Does that mean that we would we have to wait for Java 22? That would be unfortunate, not only since that will take quite a while longer, but also since Java 22 won't be an LTS version. Or perhaps you meant that it is expected to be fixed in a minor version update (Java 21.1.x)? |
No need to wait for Java 22, it will work with the latest update of Java 21 with the flag |
would it be somehow possible to backport the fix to older versions? kotlin introduces support for java 21 in version 1.9.20 and there are other open issues that prevent me from updating to newer graal version (such as #7089) |
Not possible unfortunately as this is a very involved change to the Native Image behavior. |
Describe the issue
Running JUnit Jupiter tests on Kotlin
1.9.0
fails when running under GraalVM (nativeTest
via Gradle). See reproducer project.Cross filed as:
KT-60211
with Kotlin team1.9.0
micronaut-projects/micronaut-core#9547 with Micronaut teamThe error:
This happens for classes:
kotlin.annotation.AnnotationRetention
kotlin.annotation.AnnotationTarget
Steps to reproduce the issue
Please include both build steps as well as run steps
1.8.22
to1.9.0
nativeTests
, observe errorDescribe GraalVM and your environment:
22.3.1
, GraalVM 20More details
This bug disappears when built against Kotlin
1.8.22
. Changing the language version to1.8
on SDK1.9.0
yields no change.(Log attached, too big for issue body)
The text was updated successfully, but these errors were encountered: