-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Don't unconditionally enable bevy_render or bevy_assets if mutli-threaded feature is enabled #11726
Conversation
@@ -77,7 +77,7 @@ serialize = [ | |||
multi-threaded = [ | |||
"bevy_asset/multi-threaded", | |||
"bevy_ecs/multi-threaded", | |||
"bevy_render/multi-threaded", | |||
"bevy_render?/multi-threaded", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat, I hadn't seen this syntax before. Do you have docs to link for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html doesn't appear to mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha: https://doc.rust-lang.org/cargo/reference/features.html
The "package-name/feature-name" syntax will also enable package-name if it is an optional dependency. Often this is not what you want. You can add a ? as in "package-name?/feature-name" which will only enable the given feature if something else enables the optional dependency.
Objective
bevy_render has been set to be automatically enabled if mutlti-threaded feature is
Solution
make it conditional