Using Kotlin 1.7.10, kotlinx.serialization 1.3.3 I...
# serialization
r
Using Kotlin 1.7.10, kotlinx.serialization 1.3.3 I'm stuck on this error, I don't know what it means. I don't know what it's looking for exactly.
Copy code
> Task :linkPodDebugFrameworkIosArm64 FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-serialization-core" in [/Users/ribesg/Projects/events, /Users/ribesg/.konan/klib, /Users/ribesg/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/common, /Users/ribesg/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/platform/ios_arm64]
If I try with kotlinx.serialization 1.4.0-RC I get this:
Copy code
> Task :linkPodDebugFrameworkIosArm64 FAILED
e: Compilation failed: Expecting descriptor for kotlinx.serialization/MissingFieldException.<init>|399804788095754142[0]

 * Source files:
 * Compiler version info: Konan: 1.7.10 / Kotlin: 1.7.20
 * Output kind: STATIC_CACHE

e: java.lang.IllegalStateException: Expecting descriptor for kotlinx.serialization/MissingFieldException.<init>|399804788095754142[0]
        at org.jetbrains.kotlin.backend.konan.serialization.KonanIrLinker$KonanCachedLibraryModuleDeserializer.deserializeIrSymbol(KonanIrlinker.kt:635)
        at org.jetbrains.kotlin.backend.common.serialization.FileDeserializationState$symbolDeserializer$3.invoke(IrFileDeserializer.kt:88)
        at org.jetbrains.kotlin.backend.common.serialization.FileDeserializationState$symbolDeserializer$3.invoke(IrFileDeserializer.kt:77)
        at org.jetbrains.kotlin.backend.common.serialization.IrSymbolDeserializer.deserializeIrSymbolData(IrSymbolDeserializer.kt:67)
1
So I was just running
build
to get this error, but running more granular tasks I found that
linkPodDebugFrameworkIosX64
builds successfully.
linkPodDebugFrameworkIosSimulatorArm64
fails with the same error than
linkPodDebugFrameworkIosArm64
(using 1.3.3)
I have dependencies which are built with a configuration containing this
Copy code
"commonMainApi"("io.ktor:ktor-client-resources:${Versions.ktor}") {
        exclude("org.jetbrains.kotlinx", "kotlinx-serialization-core")
    }
This exists because there was a conflict with the transitive dependency being older… guess I'll get rid of that and see
That was it. I still think it's a bug of Kotlin/Native, maybe I'll make a reproducer, idk