Did the `kotlin` CLI in version 2.4.0 stop to supp...
# scripting
s
Did the
kotlin
CLI in version 2.4.0 stop to support the
@file:CompilerOptions("-jvm-target", "25")
annotation in
.main.kts
scripts? Because I'm getting > error: cannot inline bytecode built with JVM target 25 into bytecode that is being built with JVM target 1.8. Specify proper '-jvm-target' option. although I am declaring to use Java 25...
i
Should work as before. Some brief testing shows no problem. Please provide some more details.
s
Hi @ilya.chernikov, thanks for your reply. What I'm observing in this PR for a dependency update with no other code changes is that it fails with "cannot inline bytecode built with JVM target 21 into bytecode that is being built with JVM target 1.8" although the script has a JVM target of 21. So the error does not make any sense to me, and the relevant change seems to be not the JGit dependency, but probably the build environment in the GitHub runner was upgraded to Kotlin 2.4.0. But I'll double-check on that.
BTW, don't get confused, my original script targeted Java 21, but I also toyed with targeting Java 25. Same problem, though.
And yes, the GitHub runner uses
Kotlin version 2.4.0-release-281 (JRE 21.0.11+10-LTS)
. I'm pretty sure it was working with Kotlin 2.3.*. I'll try to downgrade to verify.
Yes, confirmed, downgrading the Kotlin version in the GitHub runner from 2.4.0 to 2.3.21 makes the job pass again.
@ilya.chernikov does this help to reproduce the issue?
Should I create a ticket?
i
I'm not yet sure it helps; I need to look into it a bit deeper. But yes, please create an issue; it is always good to have one.
s
Ok, will do and link it here.