Xseventh opened a new issue, #362:
URL: https://github.com/apache/tvm-ffi/issues/362

   Hi — question about tvm_ffi.dataclasses.c_class.
   
   Right now @c_class(type_key) fails unless the Python proxy class lists all 
C++ reflected fields in __annotations__ (otherwise it raises “Missing fields … 
Defined in C++ but not in Python”). But reflected member functions don’t need 
any Python-side declaration — they just show up.
   
   This feels inconsistent and makes it hard to generate proxies dynamically 
(I’d like to create a class directly from reflection metadata without manually 
duplicating the field list).
   
   Is there a design reason for enforcing the annotation check for fields? If 
not, would you consider an option like a “non-strict / auto fields” mode where:
   
   if Python has no annotations → auto expose all C++ fields
   
   if Python annotates a subset → expose that subset (no missing-fields error)
   
   still error on extraneous fields (typos)
   
   Thanks!


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