I upgraded from Koin 3.5.0 to 3.5.3 in my multipla...
# koin
m
I upgraded from Koin 3.5.0 to 3.5.3 in my multiplatform project and started getting this error when attempting to build my iOS target:
Copy code
Could not find "co.touchlab:stately-common" in [/Users/xxx/StudioProjects/studyround-mobile-kmp, /Users/xxx/.konan/klib, /Users/xxx/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.21/klib/common, /Users/xxx/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.21/klib/platform/ios_simulator_arm64]error: Compilation finished with errors
I'm using
koin-core
and
koin-android
p
is your project public? can you try 3.6.0?
m
No, it's not public. I tried
3.6.0-alpha1
and it still gives the same issue.
p
Which gradle are you using?
m
agp 8.2.2
p
did you run kdoctor ?
m
Just did. All good
p
can you post more CLI the one posted is not very precise.
m
Sure
Screenshot 2024-01-31 at 13.45.26.png
Note: It works fine on
3.5.0
I've been building this project for a while now (~2 months) and this is the first time this is happening. I'm not using sqldelight (another common source of this error)
p
so if you revert onle koin this problem starts ?
m
Yup. Only the Koin version change causes this
p
wich version of the Xcode you have?
m
That's me building on Fleet. Let me try building on XCode
p
it seems it's related to Simulator
m
I'm on Xcode 15.2 and Fleet 1.29
p
I had similar problem but was because Xcode Update to 17 and then Tools needs to be updated
m
Xcode won't build
p
Sorry I meant ios 17
m
Yeah, I'm on iOS 17.2. It doesn't seem to be simulator related though
p
can you start the simulator
oh ok
so you are using kotlin 1.9.21 correct ?
m
Yup. Thatโ€™s correct
p
can you do incremeent 1.9.22
compose version is 1.5.8 or ?
also try ./gradlew clean before retry
m
Good call, let me see if the Kotlin upgrade works. Iโ€™m on compose 1.5.11
p
Screenshot 2024-01-31 at 13.57.50.png
m
Oh you meant the compose compiler
p
just bare in mind there is a new version that was release 1.6.0 from compose
they are related so try to update both
I would got with compose 1.5.8 kotlin 1.9.22
m
Gotcha. Building that nowโ€ฆ
๐Ÿ™Œ 1
p
let me know if it's gone
m
Did all the updates and it's still the same thing
So strange
๐Ÿ‘€ 1
p
yes it is
can you run in comand line ?
m
Please, Pardon me, something came up. Iโ€™ll respond soon
โœ… 1
p
I recall a similar error message and the cure was to add the library explicitly in gradle. But what is weird is how it relates to koin. The library in my problem was SQLDelight
m
Yeah, I saw that suggestion for the SQLDelight error. It's just that I'm not using SQLDelight in my project, so I'm not sure why this happened in the first place
@Pedro Alberto I decided to be more pragmatic and pulled in this Compose Multiplatform project from the KMP Template Library: https://kmp.jetbrains.com/#templateLibrary I built it then ran it successfully on Android and iOS. It came with Koin
3.5.0
I decided to bump Koin to
3.5.3
to see if the same issue would arise, and here it is:
p
@Mofe Ejegi thanks for taking the time maybe this is related to the Gradle changes @arnaud.giuliani
๐Ÿ™ 1
I will do the same and will let you know if there is a fix
๐Ÿ‘ 1
a
can you wrap up the issue here? (sorry too much message ๐Ÿ˜… )
๐Ÿ‘ 1
m
To summarise... Upgrading from Koin 3.5.0 to 3.5.3 in a multiplatform project shows this error when building for iOS.
Copy code
Could not find "co.touchlab:stately-common" in [/Users/xxx/StudioProjects/studyround-mobile-kmp, /Users/xxx/.konan/klib, /Users/xxx/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.21/klib/common, /Users/xxx/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.21/klib/platform/ios_simulator_arm64]error: Compilation finished with errors
You can simply test this using the https://kmp.jetbrains.com/#templateLibrary (It comes with Koin 3.5.0. Updating to 3.5.3 causes this issue).
a
Ok ๐Ÿ‘
seems related to stately? ๐Ÿค” I've downloaded the Shared UI Multiplatform App template. It's already in Koin 3.5.3
m
Hello ๐Ÿ‘‹ Thanks for taking the time to look at this. Seems like they've updated the template. I'm running that now to see if the issue still persists there or if they did something else to fix it. And yes, it's related to stately. There's a similar issue that occurs with SqlDelight.
I did a side by side comparison and kept building till the errors stopped. Turns out the issue is with Kamel When updating Koin, please ensure Kamel is also updated to the latest version as well. I believe latest versions of Kamel require a Jetpack Compose upgrade also.
๐Ÿ‘ 1
a
๐Ÿ‘
p
Thanks for the effort