@Configuration classes with Kotlin in native-image are broken #29663
Labels
theme: aot
An issue related to Ahead-of-time processing
theme: kotlin
An issue related to Kotlin support
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
This happens only in a native image. I have this configuration:
Running the application works. Now rename the
a()
method toz_a()
and it breaks:Demo project here: demo.zip
I debugged that to a behaviour in Kotlin reflection. Essentially you need reflection metadata for ALL methods (not only for the
@Bean
methods like it's at the moment) if you useResolvableType.forMethodReturnType(method)
. It depends on the iteration order of the methods. You can read more here: https://github.com/mhalbritter/kotlin-graalvm-reflectionThe text was updated successfully, but these errors were encountered: