urlyy commented on PR #2791:
URL: https://github.com/apache/fory/pull/2791#issuecomment-3424056249

   Currently has a usage limitation: register must be called in a specific 
order — any dependencies must be registered first.
   
   This is because `register()` creates `type_info`, and if `struct_a` contains 
a field of type `struct_b`, then calling `register(struct_a)` before `struct_b` 
will cause an error, since the `type_resolver` won’t be able to find the 
`type_info` for `struct_b`.
   Perhaps you could provide like a `collect_and_register_all method` to handle 
this automatically.
   In addition, I plan to perform `struct_hash computation` inside 
`register()`, which also requires that all field types can be retrievable from 
the `type_resolver` before the struct is being registered.


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