Raphaël Blard
07/26/2023, 2:32 PMimport org.jetbrains.compose.web.renderComposable
fails with this error :
Unresolved reference: jetbrains
With versions :
• Compose 1.4.3
• Kotlin 1.9.0 (marked as compatible here)
Would anyone happen to have any leads ?Big Chungus
07/26/2023, 2:45 PMCLOVIS
07/26/2023, 2:48 PMBig Chungus
07/26/2023, 2:52 PMRaphaël Blard
07/26/2023, 2:53 PMBig Chungus
07/26/2023, 2:59 PMCLOVIS
07/26/2023, 3:00 PMBig Chungus
07/26/2023, 3:01 PMCLOVIS
07/26/2023, 3:01 PM:styles:style-material-tailwind
Big Chungus
07/26/2023, 3:01 PMCLOVIS
07/26/2023, 3:01 PMCLOVIS
07/26/2023, 3:02 PMBig Chungus
07/26/2023, 3:04 PMCLOVIS
07/26/2023, 3:08 PMIgor Demin
07/26/2023, 3:19 PMCompose dependencies are declared as implementation and not apiYes, in https://gitlab.com/RBD-4SH/decouple/-/blame/d3da609a9e69dbf07351f59d785faa5703a5e46b/style/material-tailwind/build.gradle.kts#L23 it should be:
api(compose.web.core)
api(compose.web.svg)
if you want Compose to be accessible from another module
There was a bug in Kotlin JS <= 1.8.22 that allowed to use libraries declared as implementation
. This bug is fixed in Kotlin 1.9, so you see this compilations error.CLOVIS
07/26/2023, 3:38 PM1. Kotlin.js plugin was deprecated in 1.8.22 so the support for it might've degraded with 1.9.0. Try switching to kmp plugin instead.Wasn't that, but well, it was a good occasion to migrate.
CLOVIS
07/26/2023, 3:42 PMcompose.web.core
is marked as deprecated in favor of compose.html.core
, I assume it makes no difference w.r.t. your comment?CLOVIS
07/26/2023, 3:45 PMapi
doesn't seem to make a differenceRaphaël Blard
07/26/2023, 3:49 PMMike Digman
07/27/2023, 10:03 PMimplementation
instead of api
for all the Compose libraries. Because of the bug referenced above, my project’s jsApp module had access to all the Compose libraries had access to Compose libraries because the common / shared module was a dependency. After the upgrade, all the Compose references were broken in the jsApp module but a change from implementation
to api
in common fixed it.