Skip to content

bsn: support inline macros in field value position#24524

Merged
cart merged 1 commit into
bevyengine:mainfrom
cart:bsn-macro-values
Jun 4, 2026
Merged

bsn: support inline macros in field value position#24524
cart merged 1 commit into
bevyengine:mainfrom
cart:bsn-macro-values

Conversation

@cart
Copy link
Copy Markdown
Member

@cart cart commented Jun 3, 2026

Objective

bsn! currently requires surrounding macros in "field value position" with {}:

bsn! {
  Foo { value: {vec![ 100, 200 ]} }
}

This is annoying!

Solution

Support macros in field-value-position:

bsn! {
  Foo { value: vec![ 100, 200 ] }
}

Testing

  • Added a test that checks that this works
  • Ported bsn! examples to use this

@cart cart added this to the 0.19 milestone Jun 3, 2026
@cart cart added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Scenes Composing and serializing ECS objects labels Jun 3, 2026
@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 3, 2026
@alice-i-cecile alice-i-cecile added the X-Uncontroversial This work is generally agreed upon label Jun 3, 2026
@alice-i-cecile alice-i-cecile enabled auto-merge June 3, 2026 23:26
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 3, 2026
@cart cart disabled auto-merge June 4, 2026 00:20
@cart cart added this pull request to the merge queue Jun 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 4, 2026
@cart cart added this pull request to the merge queue Jun 4, 2026
Merged via the queue into bevyengine:main with commit c516bd8 Jun 4, 2026
51 checks passed
@laundmo
Copy link
Copy Markdown
Member

laundmo commented Jun 6, 2026

This should be added to docs (at least the syntax table) once #24464 is merged

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-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants