-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When trying to use the native image on the documenation CI (vercel) which does not java available by default we (docs / @davifantasia ) found that the native images in the GitHub releases are not actually fully native but graalvm fallback images that require a JVM.
It's my fault effectively, I should have read the logs more carefully and not rely on passing allow-incomplete-classpath when there can be more issues than that. ( https://github.com/commercetools/rmf-codegen/blob/master/tools/cli-application/build.gradle#L23 )
Here's the log line in the last linux build: https://github.com/commercetools/rmf-codegen/runs/1463962319?check_suite_focus=true#step:4:175
2020-11-27T13:41:20.2564243Z Warning: Aborting stand-alone image build. Unsupported features in 4 methods
2020-11-27T13:41:20.2565015Z Detailed message:
2020-11-27T13:41:20.2568041Z Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a `static final` field. Method that contains the method handle invocation: java.lang.invoke.MethodHandle.invokeBasic()
2020-11-27T13:41:20.2572179Z To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
To pass report-unsupported-elements-at-runtime to the graalvm native image builder we'd have to learn how to pass mulitple options in the gradly nativeImage step.