You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by GitBox <gi...@apache.org> on 2020/03/01 19:09:07 UTC
[GitHub] [myfaces] rmpestano opened a new pull request #88: Native mod
support
rmpestano opened a new pull request #88: Native mod support
URL: https://github.com/apache/myfaces/pull/88
* Enable native mode
* Adds tests on showcase module (jvm and native)
We still miss an automatic way to [automatic register JSF managed beans](https://github.com/rmpestano/myfaces/blob/2fe17af334422284aa9362307535ecf91b2a447e/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java#L622)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593409743
Thank you for looking at it @wtlucy!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko merged pull request #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko merged pull request #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano edited a comment on issue #88: Quarkus native
mode support
Posted by GitBox <gi...@apache.org>.
rmpestano edited a comment on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593409743
Thank you for looking at it @wtlucy!
PS: I am also on Mojave, maybe someone with Catalina would be a nice test.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593364141
It is working great @tandraschko, awesome work!
Also the native image size still the same, around 108 MB
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593376309
great, removed it!
I will try to setup the PF quarkus soon
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593305962
@rmpestano sure :)
I already splitted up the methods for now. Will commit it soon.
Also i will try to scan @Named beans and loop public getter and register them.
Some questions:
1) QuarkusExceptionHandlerFactory.class.getName(); you added this but we already collect all "ExceptionHandlerFactory" classes and impls; do we really need this?
2)
import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
import com.sun.org.apache.xpath.internal.functions.FuncLocalPart;
import com.sun.org.apache.xpath.internal.functions.FuncNot;
do we really need this reflection support?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593340305
@rmpestano
i refactored the whole thing
moved PF to own methods
and loop all @Named beans + public fields / getters
can you give it a try?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593336681
For 1, if we remove it we get:
```
java.lang.ClassNotFoundException: org.apache.myfaces.core.extensions.quarkus.runtime.exception.QuarkusExceptionHandlerFactory
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
at java.lang.Class.forName(DynamicHub.java:1224)
at org.apache.myfaces.util.lang.ClassUtils.classForName(ClassUtils.java:155)
```
For some reason it not gets collected in `collectClassAndSubclasses`, I think it's because it is defined on the extension itself....
For 2, i get:
```
Could not load or parse web-fragment.xml
Could not load or parse web-fragment.xml
```
eventhough the application works without issues. I only get that message on the console and nothing more, for some reason on MacOS the native image is not generating the debug.log file, I need to test on Ubuntu to see if I get a stacktrace. This is what I got:
<img width="1342" alt="Screenshot 2020-03-02 at 11 37 13" src="https://user-images.githubusercontent.com/1592273/75668850-3d27b780-5c7a-11ea-845d-60beb1c6b4b1.png">
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593339368
By the way, I'm using this command to run the test against a generated native image:
`mvn failsafe:integration-test -Pnative -Dquarkus.test.native-image-profile=dev -Dnative.image.path=target/quarkus-myfaces-showcase-1.0-SNAPSHOT-runner -Dquarkus.log.file.path=target/debug.log` note that failsafe is overriding the quarkus.log.file.path parameter (we also have it on application.properties)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593374960
> Can we also remove RestoreViewSupport from reflection support?
Yes, we can 👍
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593375928
If someone is watching this thread and uses a MacOS (probably also linuxes distros), can you try to run following native binary and access localhost:8080/index.xhtml?
https://drive.google.com/open?id=1m7pNtWu3Gz7YVXkcJH-fqMYVP45GennE
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593367197
i also added DocumentBuilderFactory as class/subclass instead of using the Impl name directly
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano edited a comment on issue #88: Quarkus native
mode support
Posted by GitBox <gi...@apache.org>.
rmpestano edited a comment on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593336681
For 1, if we remove it we get:
```
java.lang.ClassNotFoundException: org.apache.myfaces.core.extensions.quarkus.runtime.exception.QuarkusExceptionHandlerFactory
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
at java.lang.Class.forName(DynamicHub.java:1224)
at org.apache.myfaces.util.lang.ClassUtils.classForName(ClassUtils.java:155)
```
For some reason it not gets collected in `collectClassAndSubclasses`, I think it's because it is defined on the extension itself....
For 2, i get:
```
Could not load or parse web-fragment.xml
Could not load or parse web-fragment.xml
```
even though the application works without issues. I only get that message on the console and nothing more, for some reason on MacOS the native image is not generating the debug.log file, I need to test on Ubuntu to see if I get a stack trace. This is what I got:
<img width="1342" alt="Screenshot 2020-03-02 at 11 37 13" src="https://user-images.githubusercontent.com/1592273/75668850-3d27b780-5c7a-11ea-845d-60beb1c6b4b1.png">
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] wtlucy commented on issue #88: Quarkus native mode support
Posted by GitBox <gi...@apache.org>.
wtlucy commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593403034
@rmpestano at a glance, the binary runs fine on my MacOS Mojave system
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593588880
Following is the linux_x86 native image, if someone wants to try:
https://drive.google.com/open?id=1hf_Vyflz732_RFzX9S7C3wYlDWJaCWFP
I've tested on Ubuntu 18.04.4
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano edited a comment on issue #88: Quarkus native
mode support
Posted by GitBox <gi...@apache.org>.
rmpestano edited a comment on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593339368
By the way, I'm using this command to run the test against a generated native image:
`mvn failsafe:integration-test -Pnative -Dquarkus.test.native-image-profile=dev -Dnative.image.path=target/quarkus-myfaces-showcase-1.0-SNAPSHOT-runner -Dquarkus.log.file.path=target/debug.log`
Note that failsafe is overriding the quarkus.log.file.path parameter (we also have it on application.properties)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano edited a comment on issue #88: Quarkus native
mode support
Posted by GitBox <gi...@apache.org>.
rmpestano edited a comment on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593588880
Following is the linux_x64 native image, if someone wants to try:
https://drive.google.com/open?id=1hf_Vyflz732_RFzX9S7C3wYlDWJaCWFP
I've tested on Ubuntu 18.04.4
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593297699
Thanks Rafael,
I will merge it.
However i will remove the showcase from the normal build from now, to not "influence" the normal MF builds
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] tandraschko commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
tandraschko commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593366803
great!
Can we also remove RestoreViewSupport from reflection support?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [myfaces] rmpestano commented on issue #88: Quarkus native mode
support
Posted by GitBox <gi...@apache.org>.
rmpestano commented on issue #88: Quarkus native mode support
URL: https://github.com/apache/myfaces/pull/88#issuecomment-593303014
Yes sure, thank you for the guidance on this PR!
Also for the showcase, maybe we can put it on the PrimeFaces extension module (not sure you want to have one on this repo) and maybe create a simpler showcase for pure MyFaces. This way we could cleanup this extension (mainly the required deps for PrimeFaces on runtime module, primefaces [application marker](https://github.com/apache/myfaces/blob/cdf4ea41cc3dc8f4e26c0e35ab6b420a37a972d5/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java#L404) and [resource bundle entries](https://github.com/apache/myfaces/blob/cdf4ea41cc3dc8f4e26c0e35ab6b420a37a972d5/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java#L567-L568)), I can help in case you need, just let me know
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services