-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Better DevExp for serialization feature support as of GraalVM 21 #14530
Comments
Thanks for bringing this up @machi1990 Although it's interesting, I don't think anyone has ever complained about serialization not working in native, which probably means no one relies on it. |
So... my secret dream would be to have a Wicket extension for Quarkus and we would need to be able to register classes for serialization for this to work :). |
Then that make you the first user to request it 😂 |
I think we are not seeing the request here (yet), as this has been mostly a GraalVM issue. |
For me, it's the role of Quarkus to expose this and make it easier to use, even if in the end few people use it. |
I would argue that it's probably prudent to reduce our surface by not introducing features that users don't have a need for. |
It would be great with serialization as I use hibernate. Composite keys, special db types etc can be supported. Simple things like binding hibernate with JoinColumns without foreign keys as well. There is great potential with support for GraalVM 21 in general, and serialization in particular. |
We'd very much welcome some sort of |
I'd like to create SerializableClassBuildItem and @RegisterForSerialization (both similar to reflection registration) |
I volunteer to review and assist if necessary. |
I suspect we will also need something similar to the |
(Except if GraalVM handles it automatically!) |
So I had a quick look and I think that maybe it is just an extra flag on fields to allow final fields to also be set (i.e when fields are registered for reflection, you can basically set a flag that says that final fields can also be updated). If this is all it is then maybe it should tie into our existing reflection infrastructure. |
PR with the implementation is prepared and approved to be merged (#15380) |
Description
The new release of GraalVM 21.0 adds serialization support, developers can configure class for serialization via the serialization configuration file
-H:SerializationConfigurationResources=/path/to-serialization-config.json
option.This release will be supported in Quarkus soon thanks to @zakkak .
This can at the moment be achieved by
quarkus.native.additional-build-args=-H:SerializationConfigurationResources=/path/to-serialization-config.json
, however we can add features like the one we added forH:ReflectionConfigurationFiles
option i.e@RegisterForReflection
annotation for better developer experience.We can also, add a way (programmaticaly) to include classes that are not part of the application e.g the ones coming from external libs / frameworks (I am wondering if there are still efforts to do this for the reflection configuration??), instead of the developer having to use the json configuration file.
/cc @gsmet @geoand @stuartwdouglas @zakkak @emmanuelbernard
The text was updated successfully, but these errors were encountered: