The GitHub Actions job "Fory CI" on fory.git/main has succeeded. Run started by GitHub user chaokunyang (triggered by chaokunyang).
Head commit for run: 3ee85f4c54a7f48330edf2d78b64daa5b3ce22b3 / urlyy <[email protected]> feat(Rust): sort fields && feat Enum && fix read/write type_info && fix type_meta en/decode (#2630) ## What does this PR do? 1. Sort fields both at compile-time and runtime.Add a `fn get_sorted_field_names(fory: &Fory) -> Vec<String>;` to get T::sorted_field_names, and use these sorted_names to guide read/write order at runtime. Sort `primitive/nullable_ primitive/container` fields at compile-time, and classify `enum/struct` and sort `final/other` fields at runtime. And it will `conditionally render code`(when a field_group is empty, will not render). What's more, `get_sorted_field_names()` caches results based on `TypeId`. 2. Feat Enum. Fulfill the code in `derive_enum.rs` and add unit test with java. 3. Fix read/write type_info. The `serialize()` function only deals with the `is_field` parameter and the `ref_flag`. Reading and writing `type_id` and `meta_share` happens inside `read()` and `write()`. What these functions do depends on the type `T` and whether `is_field` is set. For structs, no matter if they’re the outer object, a field, or an element in a container, they always write `type_id` and `meta_index`. For other types(include container and enums), `type_id` is only read or written when they are the outer object. If they show up as a field, `type_id` is skipped. 4. Fix type_meta en/decode. In previous versions, the execution order for taking the absolute value of `global_hash` was incorrect. And Some calls to `var_int()` have been changed to `var_uint()`. 5. Add some unit tests. ## Does this PR introduce any user-facing change? - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? Report URL: https://github.com/apache/fory/actions/runs/17855889905 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
