New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make --no-fallback
a default option
#2648
Comments
We are not allowed to do that. Fallback images exist for legal reasons, not for technical reasons. |
Ohh, didn't know that :-( |
Hello @christianwimmer, could you elaborate on that topic please? I'm curious to know what precise legal reason makes it impossible to have Also, reading https://www.graalvm.org/reference-manual/native-image/Limitations/, there are some technical aspects mentioned, making fallback images necessary, in some cases. |
Sorry, I am not a lawyer and therefore are not allowed to comment further on any legal reasons. |
I am not a lawyer either so I cannot provide any reliable advice on this matter (in other words you should not assume that you can act upon what I say next and have any legal redress against me or my employer for whatever consequences derive from your reading of the explanation I have provided). With that in place I'll claim that this relates to a legal requirement for the GraalVM Native Image Generator to be a comprehensive implementation of Java out of the box i.e. when run with the default settings it must output a correct executable for any valid Java program. |
Sorry, that comment got published before I was able to finish. Obviously that does not imply that it must be bug free. The acid test as to whether GraalVM Native Image generates correct executables is the the Java TCK, the suite of conformance tests that is used to check each Java release. The legal requirement is attached to the TCK. Once again, take that as merely a suggestion with no liability on my part or my employers for any credence you might attach to it. |
Thanks @adinn for this statement. It could be nice to have this precise legal aspect being completely settled and written down in a explicit documentation. It could be for example in an FAQ with a question such as : Why generated native images are fallback images by default? Thanks again for this comment. |
Feature request
I think it would really make sense to define
--no-fallback
as the default option when creating a native image.The rationale behind this is that when you create a native image and it fails you probably don't want to package the app as the jvm in the binary, but be notified that the process failed. This is aligned with the feature implemented recently to avoid using the
--no-server
flag.Describe the solution you'd like.
Make the
--no-fallback
option the default and add a new--fallback
for users that want to fallback to the jvm binary.Describe who do you think will benefit the most.
GraalVM users. Now we need to include
--no-fallback
in every script or configuration and with that option being the default, creating a native image would be as simple asnative-image -jar my-app.jar
(at least in Micronaut).Describe alternatives you've considered.
N/A
Additional context.
N/A
Express whether you'd like to help contributing this feature
No, but happy to test a snapshot if it's included :-)
The text was updated successfully, but these errors were encountered: