quarkiverse / quarkus-omnifaces

Quarkus OmniFaces Extension
https://omnifaces.org/
Apache License 2.0
18 stars 2 forks source link

@Param CDI Extension needs to be Quarkified #3

Closed melloware closed 1 month ago

melloware commented 2 years ago

Currently @Param is a CDI Extension which don't work in Quarkus.

https://showcase.omnifaces.org/cdi/Param

The CDI portable extension model is very flexible. Too flexible to benefit from the build time boot promoted by Quarkus. Most extension we have seen do not make use of these extreme flexibility capabilities. The way to port a CDI extension to Quarkus is to rewrite it as a Quarkus extension which will define the various beans at build time (deployment time in extension parlance).

melloware commented 2 years ago

I think we would need the BeanDiscoveryFinishedBuildItem beans like in this example below to accomplish this. Not sure how easy it is still.

Example code: https://github.com/quarkusio/quarkus/blob/main/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/WiringProcessor.java

svenhaag commented 1 month ago

Hi, when will this be fixed? Is there a workaround? Thanks

melloware commented 1 month ago

@svenhaag admittedly i think i would need @BalusC help on this one since this is core functionality of OmniFaces. It needs to be written as not a CDI extension. I will open a ticket on OmniFaces.

https://github.com/omnifaces/omnifaces/issues/859

melloware commented 1 month ago

@svenhaag we got this working!

svenhaag commented 1 month ago

Awesome. Thank you very much guys. However, I don't understand why the release is 4 digits instead of 4.5.2? Also, the warning regarding @Param should be removed I guess: https://github.com/quarkiverse/quarkus-omnifaces/blob/4.5.1.1/README.md?plain=1#L45 Cheers

melloware commented 1 month ago

4.5.1 is the OmniFaces version I stay in sync with. But since this was a fix without changing the OmniFaces version I made it 4.5.1.1. Next version will be 4.5.2 to match OmniFaces release.

As for that warning it remains true. param works in JVM mode but not in Native GraalVM compilation.

melloware commented 1 month ago

@svenhaag let me know how your testing goes OK?

melloware commented 1 month ago

@all-contributors add @svenhaag for testing

allcontributors[bot] commented 1 month ago

@melloware

I've put up a pull request to add @svenhaag! :tada:

svenhaag commented 1 month ago

Thank you guys! It works indeed. Awesome.