-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Replace usage of NeverInline in jdbc-pgsql #27960
Replace usage of NeverInline in jdbc-pgsql #27960
Conversation
The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML processing code when it's not used. Instead, use a DomHelper-local bifunction field which stays null unless the XML processing code is actually reachable. If it is, the bifunction is being set by the reachability handler and, thus, achieves the same result. Closes quarkusio#27791
I'm testing this with the mandrel GHA suite here: https://github.com/graalvm/mandrel/actions/runs/3060671324 |
Mandrel GHA shows no new failures (we were seeing failures in Data5). Remaining failures are all related to the kotlin issue. See #27300. Example failure without this patch from our nightlies: |
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.
LGTM. Nice approach @jerboaa!
Thanks for the review! |
Very nice pattern, I didn't know we could do that. Thanks! |
The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML processing code when it's not used.
Instead, use a DomHelper-local bifunction field which stays null unless the XML processing code is actually reachable. If it is, the bifunction is being set by the reachability handler and, thus, achieves the same result.
Closes #27791