coil-kt / coil

Image loading for Android and Compose Multiplatform.
https://coil-kt.github.io/coil/
Apache License 2.0
10.86k stars 668 forks source link

[Coil 3] Having compile time error: Could not find "io.ktor:ktor-io-cinterop-mutex". + Repro #1968

Closed rsktash closed 9 months ago

rsktash commented 11 months ago

Having compile time error when building ios app

Xcode build output:

image

Android studio compileKotlinIosArm64 output: telegram-cloud-photo-size-2-5201859373402546818-y

Here's a repro https://github.com/rustamsmax/coil3-repro

I've opened an issue #1967 before but it was closed without investigation

colinrtwhite commented 11 months ago

Apologies - looks like I closed that ticket too quickly. I'm able to reproduce the issue locally with your sample.

colinrtwhite commented 11 months ago

I was able to work around this by using a newer version of Ktor - specifically the latest experimental wasm version. My hunch is the latest non-experimental versions of Ktor were published with a bug that occurred in Kotlin plugin 1.9.20 for native libraries. Hopefully it's fixed in the next 3.0.0 beta release or stable patch. Here's how to use the wasm build for now:


repositories {
    maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
}

dependencies {
    implementation("io.ktor:ktor-client-core:3.0.0-wasm2")
}
rsktash commented 11 months ago

with latest alpha 01 release ios target was built successfully. seems wasm artifact related issue

colinrtwhite commented 9 months ago

@rustamsmax Looks like this was fixed with the latest 2.3.8. Updating to Coil 3.0.0-alpha04, which imports that version, fixes the repro sample.