We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When attempting to codegen for my xsd representing recursive widgets in a windowing environment, I get:
error[E0072]: recursive types `Grid`, `GridRow`, `Widget` and `WidgetChoice` have infinite size --> src/generated/models.rs:39:1 | 39 | pub struct Grid { | ^^^^^^^^^^^^^^^ 40 | #[yaserde(rename = "children")] 41 | pub children: GridRow, | ------- recursive without indirection ... 55 | pub struct GridRow { | ^^^^^^^^^^^^^^^^^^ 56 | #[yaserde(rename = "child")] 57 | pub child: Widget, | ------ recursive without indirection ... 78 | pub enum WidgetChoice { | ^^^^^^^^^^^^^^^^^^^^^ 79 | Grid(Grid), | ---- recursive without indirection ... 94 | pub struct Widget { | ^^^^^^^^^^^^^^^^^ 95 | #[yaserde(flatten)] 96 | pub widget_choice: WidgetChoice, | ------------ recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | 41 ~ pub children: Box<GridRow>,
I'm happy to start contributing, but a little help on where to get started here would help.
It seems like we would need to generate:
impl YaSerialize for Box<Grid> { ... }
The text was updated successfully, but these errors were encountered:
I am by no means suggesting we merge without cleanup, but this fixes the problem:
#165
Sorry, something went wrong.
No branches or pull requests
When attempting to codegen for my xsd representing recursive widgets in a windowing environment, I get:
I'm happy to start contributing, but a little help on where to get started here would help.
It seems like we would need to generate:
The text was updated successfully, but these errors were encountered: