Skip to content
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

Print a warning if a CommandQueue gets dropped with un-applied commands #11125

Closed
JoJoJet opened this issue Dec 28, 2023 · 2 comments · Fixed by #11146
Closed

Print a warning if a CommandQueue gets dropped with un-applied commands #11125

JoJoJet opened this issue Dec 28, 2023 · 2 comments · Fixed by #11146
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@JoJoJet
Copy link
Member

JoJoJet commented Dec 28, 2023

What problem does this solve or what need does it fill?

When dealing with exclusive world access, SystemState is useful for interfacing with the world with an interface similar to regular systems. However, it's very easy to forget to call .apply(), which can result in commands being lost.

What solution would you like?

There should be a warning if a SystemState gets dropped without being applied. To accomplish this, we should be able to put a warning in the Drop impl for CommandQueue

What alternative(s) have you considered?

None.

@JoJoJet JoJoJet added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled D-Trivial Nice and easy! A great choice to get started with Bevy C-Usability A targeted quality-of-life change that makes Bevy easier to use A-ECS Entities, components, systems, and events and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Dec 28, 2023
@doonv
Copy link
Contributor

doonv commented Dec 29, 2023

We should also provide a way to drop the unapplied CommandQueue without the warning.

@hymm
Copy link
Contributor

hymm commented Jan 3, 2024

We should also provide a way to drop the unapplied CommandQueue without the warning.

Note that any commands in unapplied CommandQueue actually have entities allocated to them that need to be cleaned up too.

github-merge-queue bot pushed a commit that referenced this issue Jan 3, 2024
…ueue (#11146)

# Objective

- Fixes #11125 
## Solution

Add a warning for un-applied commands to the `drop` function.
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-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants