Make get_mapped_range return a Result rather than panicking#9281
Merged
cwfitzgerald merged 1 commit intogfx-rs:trunkfrom Apr 9, 2026
Merged
Make get_mapped_range return a Result rather than panicking#9281cwfitzgerald merged 1 commit intogfx-rs:trunkfrom
cwfitzgerald merged 1 commit intogfx-rs:trunkfrom
Conversation
|
LGTM |
github-merge-queue bot
pushed a commit
to bevyengine/bevy
that referenced
this pull request
Mar 23, 2026
# Objective - Completes goal and closes #23029 - Culmination of #22761, #23350, #23349, #23433, #23458, #23444, #23459, #23461, #23463, #22714, #22759, #16481 ## Solution - Add a release note. - Re-export a wgpu type that you need to match on to handle errors. ## Testing - cargo run --example render_recovery with all the other PRs merged in. Press 5 and then V, the app will not crash. Note that D for "destroy device" will still crash: this is a WGPU problem resolved by gfx-rs/wgpu#9281. # Note I opted not to change the default recovery behavior yet. I believe we need testing in user projects and just general trodding of this code path before committing to a new default. It works in a simple example, it might not work in a complex project. We need to field test this and likely iterate to really call this ready IMO.
cwfitzgerald
requested changes
Mar 27, 2026
Member
cwfitzgerald
left a comment
There was a problem hiding this comment.
Some note, looks broadly good
splo
pushed a commit
to splo/bevy
that referenced
this pull request
Mar 31, 2026
# Objective - Completes goal and closes bevyengine#23029 - Culmination of bevyengine#22761, bevyengine#23350, bevyengine#23349, bevyengine#23433, bevyengine#23458, bevyengine#23444, bevyengine#23459, bevyengine#23461, bevyengine#23463, bevyengine#22714, bevyengine#22759, bevyengine#16481 ## Solution - Add a release note. - Re-export a wgpu type that you need to match on to handle errors. ## Testing - cargo run --example render_recovery with all the other PRs merged in. Press 5 and then V, the app will not crash. Note that D for "destroy device" will still crash: this is a WGPU problem resolved by gfx-rs/wgpu#9281. # Note I opted not to change the default recovery behavior yet. I believe we need testing in user projects and just general trodding of this code path before committing to a new default. It works in a simple example, it might not work in a complex project. We need to field test this and likely iterate to really call this ready IMO.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Description
We shouldn't be panicking in get_mapped_range. Let's return a result.
Testing
Existing panic tests now check for Err instead.
Squash or Rebase?
Whatever your heart desires
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.