junrushao opened a new pull request, #663: URL: https://github.com/apache/tvm-ffi/pull/663
Architecture: - Resolve annotations from each declaring class so forward references, recursive classes, and mixins no longer depend on merged inherited annotations. - Centralize typed reflection conversion in TypeAttr and ObjectDef while native object-valued fields receive explicit placement construction and destruction. - Carry nested field paths through conversion failures and compute init-only properties after FFI-backed construction. Public Interfaces: - Add init_property for values derived once after dataclass initialization. - Add reflection conversion hooks for type attributes and object definitions. - Make py_class use tree structural equality by default; callers can still opt out explicitly with structural_eq=None. UI/UX: - None. Behavioral Changes: - Dataclass field resolution now respects the class that declares each field. - Native field conversion reports the complete path to a failing nested value. - Device strings and reflected ancestor types use the shared conversion path. Docs: - Update the structural equality guide for the new py_class default. - Keep lower-level reflection and init_property behavior documented through API comments and focused tests; a broader narrative guide can follow separately. Tests: - Clean editable C++/Cython build completed successfully. - 1103 focused dataclass, structural, converter, typed-method, and function tests passed; 2 expected failures remained expected. - Scoped pre-commit hooks passed for all files in this boundary. Untested Edge Cases: - Rust bindings, Windows/MSVC, and the full cross-platform test matrix were not run for this intermediate boundary. - Stub regeneration exposes pre-existing drift in mutable-container annotations and an omitted test helper, so those unrelated generated edits are deferred. BREAKING CHANGE: py_class now defaults to tree structural equality and field resolution follows each declaring class. Extensions that depend on the previous default or annotation-merging behavior must opt out or update their declarations and rebuild C++/Cython artifacts. -- 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]
