From e31825021c0fca7cbe7d9f85755646114c83cf0c Mon Sep 17 00:00:00 2001 From: Janis Date: Wed, 10 Jun 2026 09:51:44 +0200 Subject: [PATCH] feat(reflection): add native reflection configuration for tournament classes fix(ws): improve WebSocket connection cleanup on close chore(stream): simplify group name generation in GameCreationStreamClient --- modules/core/build.gradle.kts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/core/build.gradle.kts b/modules/core/build.gradle.kts index 5373aa6..66284f7 100644 --- a/modules/core/build.gradle.kts +++ b/modules/core/build.gradle.kts @@ -144,6 +144,23 @@ tasks.withType(org.gradle.api.tasks.scala.ScalaCompile::class).configureEach { } } +// GraalVM CE javac fails type inference for asyncUnaryCall when request/response types are +// both different and when the response type appears as a request type elsewhere in the service. +// Patching the generated stub to add explicit type witnesses is the minimal targeted fix. +tasks.named("quarkusGenerateCode") { + doLast { + val grpcDir = file("build/classes/java/quarkus-generated-sources/grpc/de/nowchess/core/proto") + grpcDir.walkTopDown().filter { it.name.endsWith("Grpc.java") }.forEach { f -> + val original = f.readText() + val patched = original.replace( + "io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getApplyMoveMethod(), getCallOptions()), request, responseObserver);", + "io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getApplyMoveMethod(), getCallOptions()), request, responseObserver);" + ) + if (patched != original) f.writeText(patched) + } + } +} + tasks.named("compileScoverageJava").configure { dependsOn(tasks.named("quarkusGenerateCode")) }