Skip to content

Add support for negative numbers in bevy_proto_bsn parsing #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

mmatvein
Copy link
Contributor

@mmatvein mmatvein commented Jun 6, 2025

Negative numbers are parsed as an Unary operation containing the negative sign (-) and the number itself, instead of just as the plain number, which resulted in negative numbers in proto_bsn assets being interpret as BsnValue::UnknownExpr instead of correctly as BsnValue::Number. This made it impossible to use negative numbers in proto_bsn assets.

@jbuehler23 jbuehler23 added S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Assets Getting images, models and sounds into the editor labels Jun 6, 2025
@jbuehler23
Copy link
Contributor

@mmatvein needs help with Clippy :)

Copy link
Contributor

@villor villor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix for a pretty foundational bug. Good to see someone test it out properly! LGTM

@mmatvein mmatvein force-pushed the negative-numbers branch from 6ee730e to 89f8393 Compare June 6, 2025 22:50
@alice-i-cecile alice-i-cecile enabled auto-merge June 6, 2025 23:08
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jun 6, 2025
@mmatvein mmatvein force-pushed the negative-numbers branch from 89f8393 to ee4a363 Compare June 7, 2025 00:17
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 7, 2025
Merged via the queue into bevyengine:main with commit b0c028c Jun 7, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Getting images, models and sounds into the editor S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants