grpc-kotlin
grpc-kotlin copied to clipboard
kotlinx coroutines versions are out of date (in bazel)
IO_GRPC_GRPC_KOTLIN_ARTIFACTS = [
"com.google.guava:guava:29.0-jre",
"com.squareup:kotlinpoet:1.5.0",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5",
"org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.5",
]
has a few pretty old versions with breaking changes occurring in channel apis. I get errors when trying to use 1.4.3 (which itself is out of date with newer versions). org.jetbrains.kotlinx:kotlinx-coroutines-core can probably just be org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm too.
The rules in WORKSPACE are also old but those are easier to opt out of it seems since they are only loaded if they dont exist already
Compiling gRPC-Kotlin with 1.4.3 was fine for me, as far as I can tell. Migrating to 1.5 will require a tiny bit of work at least:
stub/src/main/java/io/grpc/kotlin/ServerCalls.kt:269:34: warning: 'offer(E): Boolean' is deprecated. Deprecated in the favour of 'trySend' method
if (!requestsChannel.offer(message)) {
^
Switching to trySend is quite straightforward (but didn't exist before 1.5.0, so would be a breaking change).
cc @aragos
I think this was fixed in https://github.com/grpc/grpc-kotlin/pull/327 and https://github.com/grpc/grpc-kotlin/pull/340