-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GR-39370] Fall back to older JVMCI API when HotSpotJDKReflection is not available #4662
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
Conversation
Marking as draft till Mandrel CI tests complete. |
Thank you for this! I had started working on a fix with pretty much the same idea as what you've done. I assume that the tests are passing on your side since the PR is no longer marked as draft, and I can merge those changes as is? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks OK to me. Are there tests for SubstrateAnnotationExtractor
that can can be run? I.e. how can we be sure to not have introduced a regression for Mandrel JDK 11?
Sorry for not self-assigning the issue to myself the moment I started working on it. Nice to see that my approach ended up similar to yours :)
Correct, the tests are passing on our side. Note however that I am not sure whether these changes result in
AFAIK no, there are no such tests. @loicottet might know better though.
Other than our existing tests passing I think we don't have any other way to be sure at the moment. This PR could potentially introduce two kinds of regressions:
For 2 I feel pretty confident that it is not happening since we are still not using To be sure we need to craft new tests for |
The returned
I am pretty confident that none of those could happen, the first one because of what I wrote above, and the second one since the annotations are only initialised on a call to
I think simply testing whether an annotation class that is marked for run-time initialisation is indeed not initialised at build-time would be sufficient, since all image classes have their annotations parsed in the image class loader during the Native Image builder startup. |
Pushed with 3fccbac. I think this can be closed. |
Hi @loicottet , can you please confirm that this is also getting backported to the 22.2 release branch? Thanks |
Backported with ea42fa7. Thank you @loicottet ! |
Closes #4655