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

Make scene example panic if it fails to load #17810

Closed
alice-i-cecile opened this issue Feb 11, 2025 · 0 comments · Fixed by #17812
Closed

Make scene example panic if it fails to load #17810

alice-i-cecile opened this issue Feb 11, 2025 · 0 comments · Fixed by #17812
Labels
A-Scenes Serialized ECS data stored on the disk C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon

Comments

@alice-i-cecile
Copy link
Member

This example breaks very often and we don't always catch it. It might be nice to have this scene either

  1. produce visual output so that it can be checked
  2. panic if the scene fails to load (check for LoadState::Failed)

Either of those would make the failures visible in the example report. Not sure which method would best suit the example.

option 2 for me!

Originally posted by @mockersf in #17799 (comment)

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps A-Scenes Serialized ECS data stored on the disk S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon labels Feb 11, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 11, 2025
# Objective

Fixes #17810

Y'all picked the option I already implemented, yay.

## Solution

Add a system that panics if the load state of an asset is `Failed`.

## Testing

`cargo run --example scene`

- Tested with valid scene file
- Introduced a syntax error in the scene file
- Deleted the scene file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Scenes Serialized ECS data stored on the disk C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant