Skip to content

Conversation

stepancheg
Copy link
Contributor

Add SystemNodeId and SystemSetNodeId types to be used when NodeId is known to be either of them.

This should make code easier to read and slightly safer.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Nov 27, 2023
Copy link
Contributor

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

This is a nice direction: more clearly distinguishing between these uses is valuable! My initial reaction was that it wouldn't be, since it's already wrapped in an enum, but since we're passing these values around directly, I much prefer the more strictly typed approach.

I'd like to have a little bit more documentation, especially on how these are generated and uniqueness is managed, but I'm overall very pleased with the diff.

@hymm hymm self-requested a review November 28, 2023 04:32
@BenjaminBrienen BenjaminBrienen added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jan 23, 2025
@theotherphil
Copy link
Contributor

SystemKey and SystemSetKey added in #19352 play the same role as the SystemNodeId and SystemSetNodeId in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants