chaokunyang opened a new pull request, #3126: URL: https://github.com/apache/fory/pull/3126
## Summary Closes #3112 This PR adds support for xlang serialization mode with GraalVM native image builds. ### Changes: - Add `XtypeResolver.ensureSerializersCompiled()` to ensure serializers for xlang-registered classes are compiled at GraalVM build time - Update `Fory.ensureSerializersCompiled()` to also call `XtypeResolver.ensureSerializersCompiled()` when xlang mode is enabled - Add `XlangExample` for graalvm_tests to verify xlang mode works with native-image builds - Register `XlangExample` for build-time initialization in native-image properties ### Root cause: When xlang mode is enabled, classes registered via `Fory.register()` go through `XtypeResolver`, but `Fory.ensureSerializersCompiled()` only processed classes in `ClassResolver.classInfoMap`. This meant xlang-registered classes were not properly compiled at GraalVM build time, causing NullPointerException during initialization. ## Test plan - [x] Existing xlang tests pass - [x] XlangExample added for native-image testing - [ ] CI should verify the graalvm_tests build succeeds -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
