I need to make a release artifact soon, have you l...
# kotlinx-rpc
d
I need to make a release artifact soon, have you looked into this bug?
a
Not yet
d
But do you know the cause what it could be or assumption ?
a
Some behavioral change in the compiler that hasn't been caught by compilation or tests, but this is as good of a guess as it can be without an investigation
And I don't see any other reports for it, so it is also conditional
d
kotlin = "2.4.0" kotlinx-rpc = "0.10.2" One agent said that the problem could in in DevirtualizationAnalysis but this did not help:
Copy code
listOf(
            iosArm64(), iosSimulatorArm64()
        ).forEach { iosTarget ->
            iosTarget.binaries.framework {
                baseName = "ComposeApp"
                isStatic = true
                binaryOption("bundleId", "com.mafrend.app.compose")
                linkerOpts("-lsqlite3")
            }
            // Workaround: kotlinx-rpc compiler plugin generates code that crashes
            // the Kotlin/Native DevirtualizationAnalysis phase (itable for RpcServiceDescriptor).
            // Disable it until kotlinx-rpc fixes the issue for Kotlin 2.4.0.
            iosTarget.binaries.all {
                if (buildType == org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.RELEASE) {
                    freeCompilerArgs = freeCompilerArgs + "-Xdisable-phases=DevirtualizationAnalysis"
                }
            }
        }
The weird part is that linkDebugFrameworkIosSimulatorArm64 works but linkReleaseFrameworkIosSimulatorArm64 does not work