Open jamesward opened 3 years ago
Hi @jamesward, what OS are you using?
I'm on Linux.
Have the same topic with MacOS
After debugging, I saw the root cause:
The graal analyzer is trying to resolve io.grpc.kotlin.ServerCalls$unaryServerMethodDefinition$2$$special$$inlined$map$1 The reflection result for the class (Kotlin generated) is public java.lang.Object io.grpc.kotlin.ServerCalls$unaryServerMethodDefinition$2$$special$$inlined$map$1.collect(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)
But it looks for "collect$$forInline".
Looks like some quirks with reflection in combination with kotlin flows.
So in general it is a Kotlin related topic, but I do not know how to fix that (with extra graal config) or something else.
@voigtste did you check if https://github.com/HewlettPackard/kraal solves your issue?
GraalVM 20.3.0-java11
My gRPC server runs fine under GraalVM and generates the config with the agent. But when I try to create a native image it fails:
Not sure why. To reproduce:
native-server
branch)cd examples
./gradlew :native-server:nativeImage