Hi Ceki, thanks for your feedback. When compiling a native image, it is possible to use -H:+PrintAnalysisCallTree (can be passed via buildArgs in Native Build Tools) flag to generate report of classes shipped in the native image (the ones identified by GraalVM static analysis + the ones specified in the native hints/metadata/configuration), so I usually do a diff of those to compare the impact of a change. -H:ReportAnalysisForbiddenType=com.example.Foo is also pretty useful to double check a class is not included in the native image and if it is, to get the stacktrace to allow to identify where it is reachable. Indeed providing a custom Configurator would be the cleanest approach, but it may require some additional work to allow optimized native images. By default, I think GraalVM will automatically add reflection entries for /META-INF/services entries, making ch.qos.logback.classic.util.DefaultJoranConfigurator reachable via /META-INF/services/ch.qos.logback.classic.spi.Configurator file shipped in Logback JAR. I can try to discuss with GraalVM team to see their recommendation, I will let you know their feedback if any. |