-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add native-image support #510
Conversation
I would like to outline the following:
|
@normanmaurer @gradinac PTAL 🙏 |
@violetagg I wonder if there is a way to generate these files ? Otherwise I think there is a risk we break things again in the future . |
@normanmaurer they are generated with |
...A-INF/native-image/io.netty.incubator/netty-incubator-codec-native-quic/resource-config.json
Show resolved
Hide resolved
import java.net.InetSocketAddress; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
// The class is copied from "codec-native-quic" module |
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.
I wonder if we couldn't somehow do this as part of the build so we not have to duplicate code . Same for above.
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.
yeah let me check this one
Motivation: In order to support `native-image`, the project has to provide the corresponding configuration for reflection, JNI and resources. Modifications: - Module `codec-native-quic`: Add profile `native-image-agent` for generating `native-image` configuration - New module `testsuite-native-image`: Add profiles `native-image-quic-server`/`native-image-quic-client` for testing the `native-image` configuration Result: Fixes #464
@normanmaurer PTAL |
{ | ||
"condition":{"typeReachable":"io.netty.incubator.codec.quic.Quiche"}, | ||
"pattern":"\\QMETA-INF/native/libnetty_quiche_osx_x86_64.jnilib\\E" | ||
}, |
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.
{ | |
"condition":{"typeReachable":"io.netty.incubator.codec.quic.Quiche"}, | |
"pattern":"\\QMETA-INF/native/libnetty_quiche_osx_x86_64.jnilib\\E" | |
}, | |
{ | |
"condition":{"typeReachable":"io.netty.incubator.codec.quic.Quiche"}, | |
"pattern":"\\QMETA-INF/native/libnetty_quiche_osx_x86_64.jnilib\\E" | |
}, | |
{ | |
"condition":{"typeReachable":"io.netty.incubator.codec.quic.Quiche"}, | |
"pattern":"\\QMETA-INF/native/libnetty_quiche_osx_aarch_64.jnilib\\E" | |
}, |
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 will work only when GraalVM supports it oracle/graal#2666
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.
Can you add a comment for this...
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.
ok I will add the resource so that we don't need to add it later and in addition I'll add a comment that this is still not supported.
{ | ||
"condition":{"typeReachable":"io.netty.incubator.codec.quic.Quiche"}, | ||
"pattern":"\\QMETA-INF/native/libnetty_quiche_osx_aarch_64.jnilib\\E", | ||
"//note": "Apple M1 is still not supported https://github.com/oracle/graal/issues/2666" |
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.
GraalVM will ignore this note
Warning: Unknown attribute(s) [//note] in resource and resource bundle descriptor object
@violetagg thanks a lot! You want to do another PR to run the test suite regularly as well ? |
sure |
Motivation:
In order to support
native-image
, the project has to provide the corresponding configuration for reflection, JNI and resources.Modifications:
codec-native-quic
: Add profilenative-image-agent
for generatingnative-image
configurationtestsuite-native-image
: Add profilesnative-image-quic-server
/native-image-quic-client
for testing thenative-image
configurationResult:
Fixes #464