Skip to content

for JVM target 1.8 #190

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

Closed
mskimorg opened this issue Jan 5, 2023 · 3 comments
Closed

for JVM target 1.8 #190

mskimorg opened this issue Jan 5, 2023 · 3 comments

Comments

@mskimorg
Copy link

mskimorg commented Jan 5, 2023

My existing Scala Spark (using sbt) project which compiled with -source 1.8 -target 1.8 shows

Kotlin: 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

Should I rebuild this project with 8 (which replaces 11 below)

const val jvmTarget = "11"


I tried:

libraryDependencies ++= Seq(
  "org.jetbrains.kotlin" % "kotlin-stdlib" % "1.7.22",
  "org.jetbrains.kotlinx.spark" % "kotlin-spark-api_3.1.2_2.12" % "1.2.2"
)

and the kotlin code was

fun main() {
    println("hello")
    withSpark {
        dsOf(1, 2, 3).show()
    }
}

.

without withSpark block, it works and shows

hello
@Jolanrensen
Copy link
Collaborator

Copy of #186, #183,
fixed in #189
Already released the fix in the dev version https://github.com/orgs/Kotlin/packages?tab=packages&q=kotlin-spark-api and I´m in the process right now of releasing version 1.2.3 which will have full java 8 support.

@Jolanrensen
Copy link
Collaborator

https://github.com/Kotlin/kotlin-spark-api/releases/tag/1.2.3

@mskimorg
Copy link
Author

mskimorg commented Jan 19, 2023

It works! Thanks.

I tested with

// in sbt
libraryDependencies ++= Seq("org.jetbrains.kotlinx.spark" % s"kotlin-spark-api_3.1.2_2.12" % "1.2.3")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants