https://kotlinlang.org logo
Title
k

Koneko Toujou

02/06/2023, 7:07 AM
is this normal https://dpaste.org/V3VH2/raw (SOLVED)
o

Oleksandr Karpovich [JB]

02/06/2023, 9:39 AM
Just to be sure what you consider to be not normal here: do you mean that it’s weird that :common:compileDebugKotlinAndroid prints a normal errors list, but :common:compileKotlinDesktop prints a stacktrace with KotlinFrontEndException ? it seems to be not normal IMO
k

Koneko Toujou

02/06/2023, 9:50 AM
Both I guess?
Didn't expect the android one to error since it from the JB compose demo examples
o

Oleksandr Karpovich [JB]

02/06/2023, 9:54 AM
Could you please point the example where you got that snippet?
tho
139
refers to
@OptIn(AlertDialog::class)
for Desktop
on Android it works without the
@OptIn
on desktop it fails with
This material API is experimental and is likely to change or to be removed in the future.
for
AlertDialog
i can send the project if you want
o

Oleksandr Karpovich [JB]

02/06/2023, 10:13 AM
if it’s okay for you, could you please file a report here https://github.com/JetBrains/compose-jb
k

Koneko Toujou

02/06/2023, 10:14 AM
@OptIn(AlertDialog::class)
itself is correct tho, right?
o

Oleksandr Karpovich [JB]

02/06/2023, 10:16 AM
yes, it’s declared here (in desktopMain) https://github.com/JetBrains/androidx/blob/jb-main/compose/material/material/src/d[…]/kotlin/androidx/compose/material/DesktopAlertDialog.desktop.kt and it has its own Experimental annotation that requires an OptIn
k

Koneko Toujou

02/06/2023, 10:16 AM
alright
seems the actual optin is
@OptIn(ExperimentalMaterialApi::class)
- https://github.com/JetBrains/compose-jb/issues/2531
also didnt know you can inline annotations o.o (like at statement level)