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

Add depending bevy features for higher level one #7855

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

nicopap
Copy link
Contributor

@nicopap nicopap commented Mar 1, 2023

Objective

Typically, when using a bevy feature such as bevy_pbr in combination with
the no-default-features system, users will need to spawn a camera,
sometimes manipulate meshes. Which requires enabling other bevy features.
The process of finding what features need to be enabled is time consuming
and frustrating, as the error messages do not give a hint as of what needs to
be done.

Solution

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. And everyone was happy
eversoafter.

Note that since the higher level crates already depend internally
on lower level crates, the only compilation time increase would
be when generating the bevy doc (because seemingly,
rustdoc is very slow at resolving re-exports)


Changelog

  • higher level bevy features such as bevy_pbr now automatically adds lower level features (such as bevy_core_pipeline and bevy_render)

@alice-i-cecile alice-i-cecile added A-Meta About the project itself C-Usability A simple quality-of-life change that makes Bevy easier to use labels Mar 2, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds labels Mar 2, 2023
@james7132 james7132 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 Mar 9, 2023
@alice-i-cecile
Copy link
Member

@nicopap you may need to force push to fix CI.

- 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.
auto-merge was automatically disabled March 13, 2023 20:10

Head branch was pushed to by a user without write access

@nicopap
Copy link
Contributor Author

nicopap commented Mar 14, 2023

This doesn't add new dependencies, I guess CI is broken again :/ Also given #8081, I think it's legitimate to try to get this merged.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 14, 2023
Merged via the queue into bevyengine:main with commit 1319661 Mar 14, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
@nicopap nicopap deleted the add-feature-dependencies branch August 30, 2023 13:46
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 A-Meta About the project itself A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use 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.

Bevy features lead to compilation failures
4 participants