dojo icon indicating copy to clipboard operation
dojo copied to clipboard

[BUG] Introspect derive macro fail

Open notV4l opened this issue 6 months ago • 4 comments
trafficstars

Describe the bug Introspect derive macro will fail for a Span/Array if it's last field and doesnt end by comma & have a comment

Not Ok

#[derive(Copy, Drop, Serde, Introspect)]
#[dojo::model]
pub struct MyModel {
    #[key]
    pub id: u32,
    pub array: Span<u32> // comment <-- fail :(
}

Ok

#[derive(Copy, Drop, Serde, Introspect)]
#[dojo::model]
pub struct MyModel {
    #[key]
    pub id: u32,
    pub array: Span<u32>, // comment
}

Additional context 1.4.0

notV4l avatar Apr 25 '25 11:04 notV4l