suresh
11/07/2025, 12:14 AMsuresh
11/07/2025, 12:15 AM3.3.2 - According to https://youtrack.jetbrains.com/issue/KTOR-8878, this appears to be fixed, but I’m still facing the issue.
2. Does the plugin support type-safe routes?
3. The plugin silently skips generation when the GraalVM plugin is applied with custom source sets.suresh
11/07/2025, 12:20 AM"org.graalvm.buildtools.native" - 0.11.2
Here is the custom sourceset (as per the native image documentation)
val graal by
sourceSets.registering {
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
}
configurations {
val graalImplementation by existing
val graalRuntimeOnly by existing
graalImplementation.extendsFrom(implementation)
graalRuntimeOnly.extendsFrom(runtimeOnly)
nativeImageClasspath.extendsFrom(graalImplementation)
}Bruce Hamilton
11/07/2025, 7:50 AMsrc/main/kotlin. We'll have support for other targets in the full release in 3.4, and it'll avoid problems like the stack overflow because it will just delegate to the serialization plugin or whatever is configured.suresh
11/18/2025, 12:55 AMexception: caused by: java.lang.StackOverflowError
exception: at org.jetbrains.kotlin.fir.types.ConeTypeUtilsKt.withArguments(ConeTypeUtils.kt:148)
exception: at io.ktor.compiler.utils.FirScopedEvaluator.resolveType(ScopedExpressionEvaluator.kt:234)
exception: at io.ktor.compiler.utils.FirScopedEvaluator.resolveType(ScopedExpressionEvaluator.kt:239)
exception: at io.ktor.compiler.utils.FirScopedEvaluator.resolveTypeProjection(ScopedExpressionEvaluator.kt:182)
exception: at io.ktor.openapi.routing.RouteStackKt.resolveType(RouteStack.kt:41)
exception: at io.ktor.openapi.model.JsonSchema$Companion.asJsonSchema(JsonSchema.kt:58)
exception: at io.ktor.openapi.model.JsonSchema$Companion.asJsonSchema(JsonSchema.kt:58)
Any idea what could cause this issue or any interim workaround ?Bruce Hamilton
11/18/2025, 8:13 AMclass Enum<E extends Enum<E>> or maybe there's some more mundane condition that causes the inference to go funky. You can probably find the problematic code by commenting out routes that use functions with generic types, since the failure occurs when trying to infer the values of type parameters based on the stack.