Skip to content

🐛 Fixes BSN support for fully qualified component paths#24817

Open
ekwoka wants to merge 1 commit into
bevyengine:mainfrom
ekwoka:bug-fix-bsn-fully-qualified-paths
Open

🐛 Fixes BSN support for fully qualified component paths#24817
ekwoka wants to merge 1 commit into
bevyengine:mainfrom
ekwoka:bug-fix-bsn-fully-qualified-paths

Conversation

@ekwoka

@ekwoka ekwoka commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Objective

Currently using fully qualified paths in bsn! fails compilation

bsn! {
  ::bevy::ui::Node
}

This is due to the parser seeing the : token and immediately going to the scene parsing path.

Solution

Check that the token isn't part of :: when checking for that branch.

Testing

There didn't seem to be any testing of the actual macro parsing (that I could find) so I put a simple test that just makes sure it compiled and produces a valid scene, though doesn't check that the scene is ACTUALLY "correct".

@kfc35 kfc35 added A-Scenes Composing and serializing ECS objects S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy D-Macros Code that generates Rust code labels Jun 30, 2026
@cart cart modified the milestones: 0.20, 0.19.1 Jul 1, 2026
@ekwoka

ekwoka commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Or...should this also handle ::: being cache + fully qualified? Does caching work with any identifiers?

@ekwoka ekwoka changed the title 🐛 Fixes BSN suport for fully qualified component paths 🐛 Fixes BSN support for fully qualified component paths Jul 1, 2026
@ekwoka

ekwoka commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Actually, seems ::: works fine as : :: for the purpose of caching a fully qualified scene function

@ekwoka ekwoka force-pushed the bug-fix-bsn-fully-qualified-paths branch from 61e8e7b to 80d24a1 Compare July 1, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Scenes Composing and serializing ECS objects C-Bug An unexpected or incorrect behavior D-Macros Code that generates Rust code D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants