Skip to content
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

Closed
ilopmar opened this issue Jul 3, 2020 · 7 comments
Closed

Make --no-fallback a default option #2648

ilopmar opened this issue Jul 3, 2020 · 7 comments
Assignees
Labels

Comments

@ilopmar
Copy link

ilopmar commented Jul 3, 2020

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 as native-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 :-)

@christianwimmer
Copy link
Member

We are not allowed to do that. Fallback images exist for legal reasons, not for technical reasons.

@ilopmar
Copy link
Author

ilopmar commented Jul 5, 2020

Ohh, didn't know that :-(

@superbob
Copy link

superbob commented Mar 1, 2021

Hello @christianwimmer, could you elaborate on that topic please?

I'm curious to know what precise legal reason makes it impossible to have --no-fallback a default setting.

Also, reading https://www.graalvm.org/reference-manual/native-image/Limitations/, there are some technical aspects mentioned, making fallback images necessary, in some cases.
Could fallback images be default also for compatibility reasons?
If these technical reasons are less important than legal reasons, then I'm even more curious about the legal reasons 😄.

@christianwimmer
Copy link
Member

Sorry, I am not a lawyer and therefore are not allowed to comment further on any legal reasons.

@adinn
Copy link
Collaborator

adinn commented Mar 2, 2021

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.

@adinn
Copy link
Collaborator

adinn commented Mar 2, 2021

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.

@superbob
Copy link

superbob commented Mar 2, 2021

Thanks @adinn for this statement.
I will consider the legal disclaimer you expressed and act as such.
It has helped me understand what the kind of reasons it could be, and it satisfies my curiosity 🙂.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants