-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Allow reflection for native serialization #19942
Conversation
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 8e4b484
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 #- Failing: extensions/vertx-http/deployment
! Skipped: core/test-extension/deployment docs extensions/agroal/deployment and 287 more 📦 extensions/vertx-http/deployment✖
⚙️ JVM Tests - JDK 16 #- Failing: extensions/vertx-http/deployment
! Skipped: core/test-extension/deployment docs extensions/agroal/deployment and 287 more 📦 extensions/vertx-http/deployment✖
|
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 8e4b484
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 #- Failing: extensions/smallrye-reactive-messaging-kafka/deployment
! Skipped: docs integration-tests/kubernetes/quarkus-standard-way-kafka integration-tests/reactive-messaging-kafka and 1 more 📦 extensions/smallrye-reactive-messaging-kafka/deployment✖
|
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 34161f0
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/amazon-lambda/deployment
! Skipped: docs extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 6 more 📦 extensions/amazon-lambda/deployment✖
|
Hello @vsevel, this looks OK to me at first glance. However, I haven't looked at the deserialization code in JDK and what other reflection access other than constructors might be needed. I think what would be good and definitive is a simple test case (in native mode) which reproduces the original issue and then verifies this change to make sure the serialization (and internally reflection) works as expected. We already have native tests which run REST endpoints, so I guess those existing ones can be enhanced to test this usecase, maybe? |
hello @jaikiran I have added a list field in the
I decompiled also the fat jar, and checked that the
Note that constructors get registered for the Yet, the test keeps failing with:
Could this be an issue in graalvm itself? |
Failing Jobs - Building e620fdb
Full information is available in the Build summary check run. Failures⚙️ MicroProfile TCKs Tests #- Failing: tcks/microprofile-config
📦 tcks/microprofile-config✖
✖
✖
✖
✖
✖
✖
⚙️ Native Tests - Main #- Failing: integration-tests/main
📦 integration-tests/main✖
|
No, that's not an issue in GraalVM (it's also not reproducible with 21.3-dev where we use quarkus/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageAutoFeatureStep.java Lines 672 to 674 in 550e59a
I created #20167 to fix it. |
Fixes #19711
I have assumed that for reflection we needed
constructor=true
and we honor annotation parametersmethods
andfields
(just like we do for the non serialization case).I kept
finalFieldsWritable
andweak
false.weak
andserialization
appear to be exclusive.I am not sure
finalFieldsWritable
makes sense withserialization
./cc @jaikiran @JiriOndrusek @stuartwdouglas