Bevy features lead to compilation failures #7854
Labels
A-Build-System
Related to build systems or continuous integration
C-Bug
An unexpected or incorrect behavior
C-Usability
A simple quality-of-life change that makes Bevy easier to use
P-Compile-Failure
A failure to compile Bevy apps
Bevy version: acfd53a
What I did
I used bevy with the
default-features = false
option in myCargo.toml
. This also can be reproduced by running examples withcargo run --no-default-features --feature <foo> --example 3d_scene
.When I compile bevy with a limited set of features, such as
bevy_pbr
, I always need to use types defined in other bevy crates, such asCamera3dBundle
(frombevy_core_pipeline
),Assets
(frombevy_asset
) orMesh
(frombevy_render
).What went wrong
If I use those components without also adding their corresponding feature flag, I get an unactionable error message (
use of undeclared type Foo
). I was expecting things to work out of the box.Proposed solution
Add the relevant features as dependencies of higher level features.
The text was updated successfully, but these errors were encountered: