https://kotlinlang.org logo
Title
a

andylamax

01/24/2023, 5:44 AM
KotlinJS 1.8.0 seems flaky. I have a large project (with more than 90 Multiplatform gradle submodules), I distribute them in a single JS targeted umbrella module I call
kasi-sdk-react
In previous kotlin versions, just adding
binaries.library()
worked. When I run
:kasi-sdk-react:nodeTest
for the first time (after a clean build), it fails with
> Task :kasi-sdk-react:compileDevelopmentLibraryKotlinJs FAILED
e: java.lang.IllegalStateException: Unexpected ir type argument
When I run the same task again, it passes. The flakiness seems to be the same failing task The most problematic part is when it comes to publishing, I am using #npm-publish and this plugin goes through the task
compileProductionLibraryKotlinJs
(Notice the difference between
compileDevelopmentLibraryKotlinJs
and
compileProductionLibraryKotlinJs
). The later, never succeeds at all. It fails with a similar error as above despite all other tasks (including
compileKotlinJs
) succeeding This whole process worked in kotlin 1.7.20. I am using gradle 7.5.1 Any hint on how I can publish my sdk???
l

Luc Girardin

01/24/2023, 6:14 AM
a

andylamax

01/24/2023, 6:36 AM
Welp, time to start searching for those start projections now
Is this bug affecting Lists only?? or every StarProjection in any generic type?
b

Big Chungus

01/24/2023, 8:56 AM
FYI if you want to bypass npm-publish integration with kgp you can just register a custom package and add required files via its configuration. You will also need to configure package.json fields yourself. That way you have full control over task graph abd configuration.
a

andylamax

01/24/2023, 11:05 AM
@Luc Girardin That was it. It took me a while to change all my star projects into Any?, and their respective bounds and I finally did it (Thanks to
grep
). You are life server. For anyone else reading this, Migrating to Kotlin 1.8.0 was a severe pain for me, Starting from my gradle plugins, to my libraries.