-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Rename Add to Queue for methods with deferred semantics #15234
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
Rename Add to Queue for methods with deferred semantics #15234
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
Can you replace https://docs.rs/bevy/latest/bevy/hierarchy/struct.ChildBuilder.html#method.add_command as part of this PR? |
I've already renamed it to |
Aha, I missed it! I've updated the migration guide in your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised this isn't a larger change. I like this much better.
Do we want to do the same with EntityCommands
?
Yes please! |
So instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see this resolved so quickly, thanks :)
I think @NthTensor was referring to |
@BenjaminBrienen yeah, looks like you missed this one. The reflect stuff doesn't need to be touched :) |
|
Weird. This file seems to escape VSCode's search feature. |
Looks like a couple were missed in doc tests: https://github.com/bevyengine/bevy/actions/runs/10873672267/job/30170042797?pr=15234#step:5:1101 |
Is there something better than |
I like |
I personally liked "push" 😅 |
Big |
@BenjaminBrienen can you please swap all uses of |
Should I leave this "enqueue" alone? There are a few more examples of "enqueue" in doc comments. |
Yep, leave the rendering stuff alone for this PR. I'm also fine to leave the docs alone. |
Awesome. If you have a chance, please update the PR title and description to match. Otherwise I'll do it on merging tomorrow during my weekly merge train. |
@BenjaminBrienen doc links are broken due to the rename (scroll down the CI run...) and there's a simple merge conflict. Ping me when you've gotten to that and I'll merge it in. |
@alice-i-cecile should be fixed now, just waiting on the CI :) |
now it should be good... ? |
Objective
EntityCommands::add
toEntityCommands::queue
#15106Solution
push
was removed as well. This will simpify the API and make the semantics more clear.Add
implies that the action happens immediately, whereas in reality, the command is queued to be run eventually.ChildBuilder::add_command
has similarly been renamed toqueue_command
.Testing
Unit tests should suffice for this simple refactor.
Migration Guide
Commands::add
andCommands::push
have been replaced withCommnads::queue
.ChildBuilder::add_command
has been renamed toChildBuilder::queue_command
.