Compare commits

...

2 Commits

Author SHA1 Message Date
Janis 1aee39c1ad feat(reflection): add GameWritebackEventDto to native reflection configuration
Build & Test (NowChessSystems) TeamCity build started
2026-06-10 11:19:21 +02:00
Janis e31825021c feat(reflection): add native reflection configuration for tournament classes
Build & Test (NowChessSystems) TeamCity build failed
fix(ws): improve WebSocket connection cleanup on close
chore(stream): simplify group name generation in GameCreationStreamClient
2026-06-10 09:51:52 +02:00
2 changed files with 19 additions and 0 deletions
+17
View File
@@ -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.<de.nowchess.core.proto.ProtoMoveRequest, de.nowchess.core.proto.ProtoGameContext>asyncUnaryCall(getChannel().newCall(getApplyMoveMethod(), getCallOptions()), request, responseObserver);"
)
if (patched != original) f.writeText(patched)
}
}
}
tasks.named("compileScoverageJava").configure {
dependsOn(tasks.named("quarkusGenerateCode"))
}
@@ -1,5 +1,6 @@
package de.nowchess.tournament.config
import de.nowchess.api.dto.GameWritebackEventDto
import de.nowchess.tournament.client.{CoreCreateGameRequest, CoreGameResponse, CorePlayerInfo, CoreTimeControl}
import de.nowchess.tournament.domain.{Tournament, TournamentPairing, TournamentParticipant}
import de.nowchess.tournament.dto.*
@@ -29,6 +30,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection
classOf[CoreTimeControl],
classOf[CoreCreateGameRequest],
classOf[CoreGameResponse],
classOf[GameWritebackEventDto],
),
)
class NativeReflectionConfig