Getting this cryptic error when trying to build wi...
# compose-web
b
Getting this cryptic error when trying to build with kotlin 1.8.0 and CfW 1.3.0-rc2
Copy code
> Task :compileKotlinJs FAILED
e: Could not find "androidx.compose.runtime:runtime" in [/home/user/.local/share/kotlin/daemon]
e: java.lang.IllegalStateException: FATAL ERROR: Could not find "androidx.compose.runtime:runtime" in [/home/user/.local/share/kotlin/daemon]
        at org.jetbrains.kotlin.ir.backend.js.KlibKt$resolverLogger$1.fatal(klib.kt:101)
Any tips?
h
Do you apply the compiler plugin without the runtime as dependency?
b
I apply both
Well gradle plugin and runtime dependency to my jsMain sourceSet
h
Oh, I tried it with my demo app too and I get the same error, nice 😄
b
Oh boy! Some of my other CfW projects build just fine with the same combo though
h
Yeah, some simple projects work fine too, but not my multi module one...
Do you want to create the issue?
b
Not really sure what to report other than what's in this thread. But I'll raise one for other to contribute their war stories.
Unless you want to do the honours or have more details 😄
h
I don't have more details (yet) 😄
o
Could you please check if you have some libraries compiled with earlier kotlin versions? I remember such a message from cases when there were dependencies compiled with older kotlin _ I see more info in the issue.
h
@Oleksandr Karpovich [JB] Yeah, this was the reason. But are any plans to make them binary compatible?
o
Unfortunately, it's not about compose. It's about compatibility in k/js or klib.
b
At the very least it would be good to have more informative error message
h
Isn't klib stable since 1.80? Or "only" js ir?
o
I'll ask around about the plans to make it compatible across versions
r
I ran into this problem on a prior upgrade as well, and it took quite some time to figure out. Would definitely love better error messaging at the very least.
Running into this problem again on upgrading to 1.8.10, with
uuid
--
Copy code
e: Could not find "uuid" in [/home/raman/.local/share/kotlin/daemon]
e: java.lang.IllegalStateException: FATAL ERROR: Could not find "uuid" in [/home/raman/.local/share/kotlin/daemon]
Now to find which library is causing this problem...
Pretty sure its the
uuid
function from routing-compose @hfhbd
Nope, a local build from
main
which is compiled with 1.8.10 and compose 1.3.0 still doesn't work
Pretty sure its ballast-debugger. So Kotlin/JS doesn't provide the standard Kotlin "2 major version" compat guarantee?
h
Still broken? But yeah, klib is not stable and it is a little bit annoying.
r
Yeah, the problematic library wasn't critical to me so I just removed it from my project. But just finding out which library it is is annoying. The best way seems to be commenting out libraries in the build until the error goes away.
h
Just write everything yourself, easier to blame 😄
m
Is there a YouTrack issue for this? I could not find anything.
m
Thank you @hfhbd!
305 Views