grpc-kotlin icon indicating copy to clipboard operation
grpc-kotlin copied to clipboard

kotlinx coroutines versions are out of date (in bazel)

Open jeffzoch opened this issue 4 years ago • 3 comments
trafficstars

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

jeffzoch avatar Aug 12 '21 16:08 jeffzoch

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).

Kernald avatar Sep 06 '21 05:09 Kernald

cc @aragos

jamesward avatar Oct 05 '21 21:10 jamesward

I think this was fixed in https://github.com/grpc/grpc-kotlin/pull/327 and https://github.com/grpc/grpc-kotlin/pull/340

jesseschalken avatar Sep 05 '22 20:09 jesseschalken