arjav1528 opened a new pull request, #3333:
URL: https://github.com/apache/fory/pull/3333

   ## Why?
   
   When other languages serialize with schema evolution enabled (TypeDef/meta 
share), Dart could not decode because it did not implement the TypeDef/TypeMeta 
read/write flow. This blocked cross-language compatibility for evolving schemas 
(see #3290).
   
   ## What does this PR do?
   
   - **TypeDef / FieldDef and body parsing**: Adds `FieldDef` and 
`RemoteFieldType` (Simple, ListSet, Map) in `meta/field_def.dart`; extends 
TypeResolverImpl to parse the full TypeDef body (field header, type info, name 
bytes or TAG_ID) and to use varuint32 small7 for type IDs in the body and in 
type meta.
   - **Meta share cache and context**: Read cache stores `(TypeInfo, 
List<FieldDef>)` per index; `DeserializationContext` gets 
`currentRemoteFieldDefs`; `readTypeInfo` sets it when returning from shared 
type meta (new or ref); `resetReadContext` clears cache and 
`currentRemoteFieldDefs`.
   - **Compatible-struct read by remote field order**: When `compatible` is 
true and `currentRemoteFieldDefs` is set, `ClassSerializer` uses 
`_readByRemoteFieldOrder`: iterates remote field defs, reads values by remote 
type (including nested LIST/SET/MAP), assigns to local fields by name 
(snake_case) or by index; supports TAG_ID for future tag-based matching.
   - **Tests**: Round-trip with compatible + ref; meta share cache (single 
marker for list element type); TypeDef format round-trip; named compatible 
(typename) and compatible by user type id; cross-language golden test added but 
skipped with a note for future integration.
   
   ## Related issues
   
   - Fixes #3290
   
   ## Does this PR introduce any user-facing change?
   
   - [x] Does this PR introduce any public API change?  
     No new public APIs; internal types (`FieldDef`, `RemoteFieldType`) are in 
`src/meta` and used by the resolver/serializer.
   - [ ] Does this PR introduce any binary protocol compatibility change?  
     No. Dart now correctly implements the existing xlang Type Meta / TypeDef 
format so that Dart can decode data produced by other languages with compatible 
+ meta share enabled.
   


-- 
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]

Reply via email to