I encountered this issue after updating the Kotlin...
# kotlinx-rpc
d
I encountered this issue after updating the Kotlin version in my project to 2.2.10:
Could not find org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin-k2:2.2.10-0.9.1
It feels counterintuitive that updating the language version would affect the libraries. Shouldn’t it be backward compatible?
a
No, compiler API is incompatible by default and all versions must be supported explicitly when a library uses a compiler plugin, like we do
d
Okay, thanks, wait for the new lib. release
n
Yes, library sometimes lagging behind. Fortunatelly, for me forsing older version works just fine:
Copy code
subprojects {
    configurations.all {
        val rpcVersion = libs.versions.kotlinRpc.get()
        if (rpcVersion != "0.9.1") error("Remove kotlinx-rpc-compiler version hack")
        val kotlinRpcCompilerVersion = "2.2.0-$rpcVersion"
        resolutionStrategy.force("org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin-k2:$kotlinRpcCompilerVersion")
        resolutionStrategy.force("org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin-backend:$kotlinRpcCompilerVersion")
        resolutionStrategy.force("org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin-cli:$kotlinRpcCompilerVersion")
        resolutionStrategy.force("org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin-common:$kotlinRpcCompilerVersion")
    }
}
😂 1
🌚 1
However, it was not the case with minor releases, where kotlin compiler get significant changes.
a
We don't provide warranty on these ^ 😅