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 ^ 😅
d
Similar issue here, but wanting to go forward to a Beta of the RPC compiler - is there any explicit support for overriding the compiler version or is above Gradle method still the best way?
a
The best way is not to do that Versions are explicitly nailed down, so that the compatibility can be guaranteed We are thinking of how we can make the backport process for the newer compiler versions, but we don't have good options for now