-
Notifications
You must be signed in to change notification settings - Fork 184
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
saxon test cannot be compiled to native with Camel 4 and Quarkus 3 #4512
Comments
It is due to |
I think the brotli decompress is introduced by apache/httpcomponents-client@db47570 I tried to add a subsitution on
The only way is to add @BuildStep
NativeImageAllowIncompleteClasspathBuildItem brotliDecIsOptional() {
return new NativeImageAllowIncompleteClasspathBuildItem("camel-quarkus-saxon");
} |
Can't we add |
Yeah, we can and it should work. Let me prepare a PR. |
This reverts commit e9ddbea.
Yes, unfortunately in order to substitute a class the class needs to be loaded in its original form. So you need a way to avoid loading the class in the first place instead. One would expect that GraalVM would be able to (which it does) see that Your two options in this case seem to be:
|
Thanks @zakkak and it can fix most of such optional dependency issues if oracle/graal#4652 get resolved in the future? |
Only if the optional access is guarded by an if statement whose condition value can be calculated by the static analysis at build time. |
The text was updated successfully, but these errors were encountered: