The GitHub Actions job "Publish Fory Java Snapshot" on fory.git/main has succeeded. Run started by GitHub user chaokunyang (triggered by chaokunyang).
Head commit for run: 7c58898247addb709a3afb91996b56f4f62c2991 / Shawn Yang <[email protected]> feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment (#3107) ## Why? The current xlang serialization implementation has inconsistencies across languages in how reference tracking and type information are handled for struct fields. This leads to: - Inconsistent handling of nullable/polymorphic fields in collections and maps - Reference tracking flags being written when ref tracking is globally disabled These inconsistencies prevent reliable cross-language serialization of complex object graphs. ## What does this PR do? This PR aligns the reference tracking and type info handling across all language implementations (Java, Python, Rust, Go, C++) to match the xlang serialization specification. ### Key Changes **C++ Implementation:** - Add `fory::monomorphic` field tag option for shared_ptr/unique_ptr to skip dynamic type dispatch - Fix collection/map serializers to only set `TRACKING_REF` flag when global ref tracking is enabled - Update top-level serialization to use `RefMode::Tracking` when ref tracking is enabled - Add `reserve_ref_id()` to keep ref ID numbering synchronized across languages - Add static assertions to prevent shared_ptr of raw pointers or nested nullable types **Go Implementation:** - Major refactoring of serialization code for xlang alignment - Add field tag support via struct tags - Improve slice, map, and struct serialization to align with spec - Better ref tracking implementation **Rust Implementation:** - Update ref tracking behavior to align with xlang spec - Add tests for cross-language compatibility **Python Implementation:** - Update serialization for xlang compatibility - Align ref tracking with other implementations **Java Implementation:** - Reorganize xlang test classes to `org.apache.fory.xlang` package - Refactored ObjectSerializer with new `FieldGroups` and `SerializationFieldInfo` - Support configured Morphic based on `ForyField` annotation, and make codegen and normal path support that too **CI/Build:** - Update CI workflow to use new test class package paths - Update AGENTS.md with corrected test commands ## Related issues #1017 #2982 #2906 ## Does this PR introduce any user-facing change? - [x] Does this PR introduce any public API change? - C++: New `fory::monomorphic` field tag option - Go: Field tag support via struct tags - [ ] Does this PR introduce any binary protocol compatibility change? - The wire format follows the existing xlang spec; this PR fixes implementations to correctly follow the spec ## Benchmark N/A - This is a correctness fix, not a performance optimization. Report URL: https://github.com/apache/fory/actions/runs/20676944014 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
