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

Panic-less version of World::run_schedule #8018

Closed
ItsDoot opened this issue Mar 10, 2023 · 2 comments · Fixed by #8028
Closed

Panic-less version of World::run_schedule #8018

ItsDoot opened this issue Mar 10, 2023 · 2 comments · Fixed by #8028
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy
Milestone

Comments

@ItsDoot
Copy link
Contributor

ItsDoot commented Mar 10, 2023

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

As of #7911, Bevy no longer panics when a system is added to a schedule that doesn't exist yet. However, that's only for adding systems, not running them.

What solution would you like?

A version of World::run_schedule that returns a Result rather than panic, likely called World::try_run_schedule.

What alternative(s) have you considered?

Check the Schedules resource for an existing schedule before running it.

Additional Context

Ran into this issue during #7936.

@ItsDoot ItsDoot added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Mar 10, 2023
@james7132 james7132 added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events and removed S-Needs-Triage This issue needs to be labelled labels Mar 10, 2023
@alice-i-cecile
Copy link
Member

Remember to check and replace internal usages too after adding this method :)

@cart
Copy link
Member

cart commented Mar 17, 2023

Relevant: #8079 (comment)

If we're going to embrace this pattern we really need to remove the warnings here. I'm removing them in that 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-Feature A new feature, making something new possible 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.

4 participants