HI! I've tried using Kotlin Spark v1.2 today, spec...
# kotlin-spark
m
HI! I've tried using Kotlin Spark v1.2 today, specifically
kotlin-spark-api_3.0.1_2.12:1.2.1
along side
Kotlin 1.6.10
with a
1.8 JVM target
on an existing code base that is already using an older version of Kotlin Spark, but once I've replaced my old dependencies with the new ones, I got
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
. Now when I go to sources I do see that it its bytecode 55 (Java 11). I was wondering if there is anything I can do about it given I'm stuck using a 1.8 JVM. Thank you for making Spark awesome btw :D
r
cc @Jolan Rensen [JetBrains]
j
hmm, we indeed target jvm 11, didn't think it would cause an issue with java 8. I think the best option is to rebuild the kotlin spark api yourself from source and replace jvmTarget in https://github.com/Kotlin/kotlin-spark-api/blob/release/buildSrc/src/main/kotlin/Versions.kt to " 8". You can set your desired spark- and scala version in https://github.com/Kotlin/kotlin-spark-api/blob/release/gradle.properties or like
./gradlew -Pspark=X.X.X -Pscala=X.X.X yourCommand
The gradle command
publishToMavenLocal
for the
kotlin-spark-api_x.x.x_x.xx
module should install it correctly to maven local on your machine. Also thanks! 🙂 let me know how it goes!
m
Thanks Jolan! Will give it a try