Skip to content

Warn or throw error to user about typo in reflect container attributes #8906

@RaminKav

Description

@RaminKav

How can Bevy's documentation be improved?

There is a lack of compiler warning or error when making a typo of using [ ] instead of ( ) in reflect container attributes like so:
#[reflect(Component)] vs #[reflect[Component]]

The latter code compiles and produces no indication of the typo to the user, leading to users (aka me lol) going down rabbit holes of bug hunting when their reflection attribute does not work.

I'm not entierly sure where the documentation code lies for this kind of change, but it might possibly lie in this file?

Ideally we should throw an error here in whatever shape that is possible. I'd love to take a stab at this in a PR if its deemed a simple enough fix, i've yet submitted a PR to bevy :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ReflectionRuntime information about typesC-DocsAn addition or correction to our documentationC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions