media-io / xml-schema

Generate rust code (structures and enum) from XSD
MIT License
53 stars 29 forks source link

Compilation failure related to complex types #48

Open Mammux opened 3 months ago

Mammux commented 3 months ago

I seem to be encountering a similar problem as in #28 and #30.

error[E0412]: cannot find type `NestedMsg` in this scope
error[E0369]: binary operation `==` cannot be applied to type `Option<NestedMsgList>`

https://gist.github.com/Mammux/7507f743167d683f44b00c8af1822c36

Mammux commented 3 months ago

Looks like Element.implement() could look at self.complex_type.sequence.element and recursively call implement() on that and add it to the TokenStream, but I don't understand the code well enough to make it work. Element does not implement implement_childs(), I think.

Mammux commented 3 months ago

I added the generated code (using store_generated_code) to the gist.