Skip to content

Handle parsing of attribute macros in a more robust way #123

@jbaublitz

Description

@jbaublitz

Pulled from #119

As stated by @ry-sun in that issue:

Attribute parsing robustness:
I noticed that multiple #[getset(...)] attributes on the same item only respect the last one (due to using filter_map(...).next_back() in parsing). For example:

#[derive(Getters)]
#[getset(get)]
#[getset(get = "pub")]
#[getset(get)]
struct MyStruct {
    a: isize,
}

only the final #[getset(get)] takes effect. We might consider using a helper like darling to simplify and harden attribute parsing; I’m happy to help integrate it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions