https://kotlinlang.org logo
Title
r

rsktash

08/01/2021, 10:24 AM
I’m fed up with this issue When I make any change to Coomposable function bodies which call this Composable and run to android my device AS doing something wrong and at runtime throwing this error
I’ve no chance except to use jetpack compose instead of jetbrains compose
o

olonho

08/01/2021, 10:33 AM
to fix this issue we’ll need a reproducer, likely you have different versions of coil when compiling and running. Not sure if it’s related to Compose per se.
r

rsktash

08/01/2021, 10:39 AM
I’m using coil core lib and copied compose codes. It’s not related to this
The problem is originating from a expect/actual composable function
I’m declaring CoilImage Composable function in commonMain and implementing android/desktop parts differently
Every time when I encounter to this issue I have to uninstall my app from the device and rerun
i

Igor Demin

08/01/2021, 11:26 AM
Does expect/actual have default parameters? There is an issue with them
r

rsktash

08/01/2021, 11:29 AM
Yes it has. Is there a workaround to this issue?When I call this function I have to pass all param values?
I’ll move all my compose codes to android module
o

olonho

08/01/2021, 11:55 AM
you can just avoid using default args in expect/actual and provide a common wrapper with default arguments
👍 1
r

rsktash

08/01/2021, 12:17 PM
It took me two days to resolve this issue
c

Colton Idle

08/01/2021, 6:13 PM
I didn't know you can use coil in compose for desktop. 🤔
r

rsktash

08/01/2021, 7:12 PM
@Colton Idle You can use it for android module for desktop you can use other code
s

spierce7

08/02/2021, 12:54 AM
What other code did you use for desktop?
r

rsktash

08/02/2021, 3:10 AM
@spierce7 I used ktor client to fetch images and called it inside LaunchedEffect where image state will be updated
I must make some optimizations later but now it’s not priority
@Igor Demin could you share the issue tracker?
i

Igor Demin

08/04/2021, 9:53 PM
The issue in compose-jb tracker And the issue in YouTrack (but the bug is probably somewhere in compose compiler) It seems the users will often encounter this, as Composable's often contain default parameters. I think we need to look at this before 1.0.0 🤔