Open ahupp opened 11 months ago
It kind of looks like I can use:
loader = capnp.SchemaLoader()
for node in cgr.nodes:
loader.load_dynamic(node)
Along with copying some of the Schema -> python module logic in SchemaParser. Still doesn't quite work though, I'm seeing a wide range of errors. Happy to share a more detailed repro if this is unexpected.
I'm writing some python with pycapnp to reflect on arbitrary capnp RPC endpoints. These endpoints have a method that returns their corresponding CodeGeneratorRequest, and I was hoping to load that at runtime. However, I'm hitting this error. Setup for the example to get a compiled schema:
Then this script to load the compiled schema:
This fails with:
Am I doing this wrong? Is there a way to work around it?