Closed sdeleuze closed 1 year ago
So my proposal is to set
--no-fallback
by default, maybe by defining BP_NATIVE_IMAGE_BUILD_ARGUMENTS = --no-fallback by default to allow to disable it in case of, and document that in https://github.com/paketo-buildpacks/native-image#configuration.
A better option proposed by @pivotal-david-osullivan is to configure --no-fallback
only when --auto-fallback
and --force-fallback
are not passed to BP_NATIVE_IMAGE_BUILD_ARGUMENTS
.
Current default behavior for
native-image
is to switch to requiring a JVM when a native build fails. This can be super confusing for users, like in this use case.If a Spring Boot 3 developer configures:
But forget to enable Spring AOT/native support when building the app (currently triggered by adding the Native Build Tools plugin with Spring Boot 3), he gets a pretty weird behavior with those messages during the build:
And then running the app fails with:
There are discussion to make
--no-fallback
the default behavior of GraalVMnative-image
but that won't happen until native passes the TCK. In the meantime, Spring Boot 3 set--no-fallback
by default when AOT/native support is enabled. But here this support is not enabled.So my proposal is to set
--no-fallback
by default, maybe by definingBP_NATIVE_IMAGE_BUILD_ARGUMENTS = --no-fallback
by default to allow to disable it in case of, and document that in https://github.com/paketo-buildpacks/native-image#configuration. This buildpack is designed to build a native image to this default configuration would make sense to me.