bazelbuild / rules_kotlin

Bazel rules for Kotlin
Apache License 2.0
331 stars 206 forks source link

klib dependencies support #808

Open Kernald opened 2 years ago

Kernald commented 2 years ago

For Kotlin/JS (and Kotlin/Native, but I guess not Kotlin/JVM), JetBrains created a new dependency format for modules built with the IR back-end, klib - https://kotlinlang.org/docs/native-libraries.html#library-format

Some projects (e.g. arrow-kt) are only publishing klib artifacts for their JS builds, having support for those here would be nice.

jbarr21 commented 5 months ago

@Bencodes @restingbull it looks like the kotlin 2.0 releases no longer ship a .jar for JS std libs (only the .klib). i think that'll be a blocker for using Kotlin 2.0.0 in the kotlin rules, which will be needed to get JDeps working with 2.0 (#843)

❯ unzip -Z1 kotlin-compiler-1.9.23.zip | ag "lib.*\-js"
kotlinc/lib/kotlin-stdlib-js-sources.jar
kotlinc/lib/kotlin-stdlib-js.jar
kotlinc/lib/kotlin-stdlib-js.klib
kotlinc/lib/kotlin-test-js-sources.jar
kotlinc/lib/kotlin-test-js.jar

❯ unzip -Z1 kotlin-compiler-2.0.0-RC1.zip | ag "lib.*\-js"
kotlinc/lib/kotlin-stdlib-js-sources.jar
kotlinc/lib/kotlin-stdlib-js.klib
kotlinc/lib/kotlin-test-js-sources.jar
kotlinc/lib/kotlin-test-js.klib
neckbosov commented 3 months ago

Hi, are there some updates here? Kotlin 2.0 was released, and without that it's impossible to use rules_kotlin with that version although 2.0 api/language versions are formally supported.

restingbull commented 2 months ago

We are considering removing js support for 2.0 -- until such time as we have proper kotlin native support.

@neckbosov -- are you actively using js support?

neckbosov commented 2 months ago

@restingbull no, we are not using it.