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

ReadAssetBytesError::Io exposes failing path #10450

Merged

Conversation

orph3usLyre
Copy link
Contributor

@orph3usLyre orph3usLyre commented Nov 8, 2023

Objective

Addresses #10438

The objective was to include the failing path in the error for the user to see.

Solution

Add a path field to the ReadAssetBytesError::Io variant to expose the failing path in the error message.

Migration Guide

  • The ReadAssetBytesError::Io variant now contains two named fields instead of converting from std::io::Error.
    1. path: The requested (failing) path (PathBuf)
    2. source: The source std::io::Error

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Nov 8, 2023
Copy link
Contributor

github-actions bot commented Nov 8, 2023

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.

crates/bevy_asset/src/loader.rs Outdated Show resolved Hide resolved
Co-authored-by: Alice Cecile <[email protected]>
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 10, 2023
@alice-i-cecile
Copy link
Member

@orph3usLyre CI failures look real; can you test this out locally and then push the changes? Once that's done I'm happy to merge this in :)

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 16, 2023
Merged via the queue into bevyengine:main with commit a2d90a8 Nov 16, 2023
21 checks passed
@orph3usLyre orph3usLyre deleted the asset-error-specifies-file branch November 17, 2023 08:16
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

Addresses #[10438](bevyengine#10438)

The objective was to include the failing path in the error for the user
to see.

## Solution

Add a `path` field to the `ReadAssetBytesError::Io` variant to expose
the failing path in the error message.

## Migration Guide
- The `ReadAssetBytesError::Io` variant now contains two named fields
instead of converting from `std::io::Error`.
    1. `path`: The requested (failing) path (`PathBuf`)
    2. `source`: The source `std::io::Error`

---------

Co-authored-by: Alice Cecile <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants