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

Bevy features lead to compilation failures #7854

Closed
nicopap opened this issue Mar 1, 2023 · 0 comments · Fixed by #7855
Closed

Bevy features lead to compilation failures #7854

nicopap opened this issue Mar 1, 2023 · 0 comments · Fixed by #7855
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

Comments

@nicopap
Copy link
Contributor

nicopap commented Mar 1, 2023

Bevy version: acfd53a

What I did

I used bevy with the default-features = false option in my Cargo.toml. This also can be reproduced by running examples with cargo 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 as Camera3dBundle (from bevy_core_pipeline), Assets (from bevy_asset) or Mesh (from bevy_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.

@nicopap nicopap added C-Bug An unexpected or incorrect behavior A-Build-System Related to build systems or continuous integration C-Usability A simple quality-of-life change that makes Bevy easier to use P-Compile-Failure A failure to compile Bevy apps labels Mar 1, 2023
nicopap added a commit to nicopap/bevy that referenced this issue Mar 1, 2023
- Fixes bevyengine#7854

Typically, when using a bevy feature such as `bevy_pbr`, users will need
to spawn a camera, sometimes manipulate meshes. Which requires enabling
other bevy features.

This commit adds those features as dependencies of "higher level"
features, so that the end user is not burdened with hunting which
feature need which other feature.
nicopap added a commit to nicopap/bevy that referenced this issue Mar 13, 2023
- Fixes bevyengine#7854

Typically, when using a bevy feature such as `bevy_pbr`, users will need
to spawn a camera, sometimes manipulate meshes. Which requires enabling
other bevy features.

This commit adds those features as dependencies of "higher level"
features, so that the end user is not burdened with hunting which
feature need which other feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant