https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
p

PHondogo

11/12/2023, 11:02 AM
Hello! Does Jetpack Compose compiler support K2? Got unresolved references on it's classes when using trying K2.
d

dmitriy.novozhilov

11/12/2023, 11:26 AM
Yes, Compose plugin supports K2 Since the plugin doesn't generate new declarations, your problem caused by some dependencies misconfiguration
e

efemoney

11/12/2023, 12:36 PM
(Sidetracking but K2 doesn’t support plugins that want to generate new declarations? How does serialization etc work then .. asking out of curiosity, maybe I’m misunderstanding)
p

PHondogo

11/12/2023, 12:37 PM
@dmitriy.novozhilov Its happens only for JS target and only if kotlin.experimental.tryK2=true All unresolved elements belong to dependency : androidx.compose.ui
s

shikasd

11/12/2023, 1:16 PM
Compose compiler does not depend on Compose UI, most likely new compiler frontend fails to resolve dependencies
d

dmitriy.novozhilov

11/12/2023, 2:41 PM
@PHondogo in this case please report an issue to youtrack
@efemoney K2 plugin API supports generation of new declarations Compose plugin doesn't need it, since it transforms existing declarations and slightly tweaks type system, not produces new ones (at least on frontend level, where all resolution happens)
👍🏾 1