Hi. I'm trying to use K2 compiler in my projects. ...
# k2-adopters
a
Hi. I'm trying to use K2 compiler in my projects. My base project builds without problem, but my derived project (building w/o K2) that uses it fails, due to "(xxx) is compiled by the new Kotlin compiler frontend and cannot be loaded by the old compiler". The error makes sense if things are essentially binary incompatible, but what feels odd to me is that I also have some modules in my base project without `useK2`in my
kotlinOptions
because they depend on Jetpack Compose (compiler plugin) but they still build (while they depend on other modules that are compiled with
useK2 = true
). Any ideas why that happens? Those builds reproduced as https://github.com/atsushieno/android-audio-plugin-framework/commit/2737fd77e176e866306329703b793e10bf8d76e7 (base) and https://github.com/atsushieno/aap-lv2/actions/runs/3384694415/jobs/5621953393#step:10:1347 (derived)
a
So I only need the base project to reproduce, right? Which particular modules are built with K1 and you feel should report an error?
a
Yes; In my
android-audio-plugin-framework
repo,
androidaudioplugin-ui-compose
is not using K2 as it depends on Compose.
a
Oh interesting, so it correctly fails if Compose is not involved. Thanks, subscribing (add to watching) there.
129 Views