-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-43837] Enable --report-unsupported-elements-at-runtime
by default and deprecate the option.
#8815
[GR-43837] Enable --report-unsupported-elements-at-runtime
by default and deprecate the option.
#8815
Conversation
Hi @vjovanov, does |
@zakkak the previous behavior can be kept with I would not connect this to |
Oh, it's just the API option being deprecated not the internal one. I see.
If I get this right, you mean that user code should never result in an unsupported element exception. In that case what's the difference for them either way? What's the benefit of changing this default? Furthermore, wouldn't it be preferable for the build to fail and prompt the user to report the issue instead of letting it build and result in a potential unexpected crash at runtime? |
Well, the user code that does not use reflection should not be able to reach elements marked as So this is for users that reach |
This flag is also historic from the time when Native Image did not support many things. Now, Native Image does not support only run-time class definition and a few other details. In all those cases we will throw an |
Thanks for the info @vjovanov. FWIW doing a quick search in the Quarkus repository I see multiple uses of Update: FTR the email requesting feedback from the Quarkus community is https://groups.google.com/g/quarkus-dev/c/v5jLzl6cwuE |
As pointed out by @vjovanov this PR results in a number of tests in the Quarkus CI job to fail (see https://github.com/oracle/graal/actions/runs/8819845538). Looking into the failures I see that they are triggered by the deletion of classes that depend on other classes not present on the classpath. For example DeleteFullTextLucene.java registers So my understanding is that GraalVM tries to load the I recall raising an issue about A potential work around in Quarkus would be to require all dependencies of I wonder if there is any way to have GraalVM achieve its goal without having to load the class, e.g. by having a "trap" that catches any call or field access to the |
2ec1127
to
9340c06
Compare
I used JVMCI to get the class information and we seem to be good: https://github.com/oracle/graal/actions/runs/8896343413 Thanks @zakkak! |
9c9a937
to
3499578
Compare
3499578
to
83c7648
Compare
The option is now enabled by default.
83c7648
to
30ae9d3
Compare
FTR that was #1725 |
Libraries can freely remove
--report-unsupported-elements-at-runtime
from theirnative-image.properties
files. If these libraries are used with previous GraalVM versions--report-unsupported-elements-at-runtime
should be added to the command line (ideally by the framework).