mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
a1545dd3a6
# Objective - When no wgpu backend is selected, there should be a clear explanation. - Fix a regression in 0.14 when not using default features. I hit this compile failure when trying to build bevy_framepace for 0.14.0-rc.4 ``` error[E0432]: unresolved import `crate::core_3d::DEPTH_TEXTURE_SAMPLING_SUPPORTED` --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/dof/mod.rs:59:19 | 59 | Camera3d, DEPTH_TEXTURE_SAMPLING_SUPPORTED, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DEPTH_TEXTURE_SAMPLING_SUPPORTED` in `core_3d` | note: found an item that was configured out --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/core_3d/mod.rs:53:11 | 53 | pub const DEPTH_TEXTURE_SAMPLING_SUPPORTED: bool = false; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: found an item that was configured out --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/core_3d/mod.rs:63:11 | 63 | pub const DEPTH_TEXTURE_SAMPLING_SUPPORTED: bool = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` ## Solution - Ensure that `DEPTH_TEXTURE_SAMPLING_SUPPORTED` is either `true` or `false`, it shouldn't be completely missing. ## Testing - Building on WASM without default features, which now seemingly no longer includes webgl, will panic on startup with a message saying that no wgpu backend was selected. This is much more helpful than the compile time failure: ``` No wgpu backend feature that is implemented for the target platform was enabled ``` - I can see an argument for making this a compile time failure, however the current failure mode is very confusing for novice users, and provides no clues for how to fix it. If we want this to fail at compile time, we should do it in a way that fails with a helpful message, similar to what this PR acheives. |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_picking | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_state | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |