-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Make bevy_reflect
feature of bevy_math
non-default
#16938
Merged
alice-i-cecile
merged 2 commits into
bevyengine:main
from
mweatherley:no-default-reflect
Dec 24, 2024
Merged
Make bevy_reflect
feature of bevy_math
non-default
#16938
alice-i-cecile
merged 2 commits into
bevyengine:main
from
mweatherley:no-default-reflect
Dec 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
added
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
A-Reflection
Runtime information about types
A-Math
Fundamental domain-agnostic mathematical operations
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
labels
Dec 22, 2024
alice-i-cecile
approved these changes
Dec 22, 2024
Jondolf
approved these changes
Dec 22, 2024
Jondolf
added
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
and removed
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
labels
Dec 22, 2024
Jondolf
reviewed
Dec 22, 2024
BenjaminBrienen
approved these changes
Dec 22, 2024
auto-merge was automatically disabled
December 22, 2024 23:18
Head branch was pushed to by a user without write access
alice-i-cecile
added
the
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
label
Dec 24, 2024
pcwalton
pushed a commit
to pcwalton/bevy
that referenced
this pull request
Dec 25, 2024
) # Objective bevy_reflect is a big part of bevy_math's dependency footprint, and is often not useful when using bevy_math standalone (as I often do). The goal with this PR is to avoid pulling in those dependencies by default without compromising the usability of bevy_math types within Bevy proper. ## Solution `bevy_reflect` has been removed from default features of `bevy_math`. However, the feature is enabled by `bevy_internal`, so that `bevy_reflect` is enabled when `bevy_math` is used through `bevy`. Philosophically, if there were a feature flag toggling reflection on `bevy` globally, then whether `bevy_math` enabled `bevy_reflect` itself would depend on that, but that doesn't exist for the time being. ## Testing It compiles :) ## Migration Guide `bevy_reflect` has been made a non-default feature of `bevy_math`. (It is still enabled when `bevy_math` is used through `bevy`.) You may need to enable this feature if you are using `bevy_math` on its own and desire for the types it exports to implement `Reflect` and other reflection traits.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Math
Fundamental domain-agnostic mathematical operations
A-Reflection
Runtime information about types
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
bevy_reflect is a big part of bevy_math's dependency footprint, and is often not useful when using bevy_math standalone (as I often do). The goal with this PR is to avoid pulling in those dependencies by default without compromising the usability of bevy_math types within Bevy proper.
Solution
bevy_reflect
has been removed from default features ofbevy_math
. However, the feature is enabled bybevy_internal
, so thatbevy_reflect
is enabled whenbevy_math
is used throughbevy
.Philosophically, if there were a feature flag toggling reflection on
bevy
globally, then whetherbevy_math
enabledbevy_reflect
itself would depend on that, but that doesn't exist for the time being.Testing
It compiles :)
Migration Guide
bevy_reflect
has been made a non-default feature ofbevy_math
. (It is still enabled whenbevy_math
is used throughbevy
.) You may need to enable this feature if you are usingbevy_math
on its own and desire for the types it exports to implementReflect
and other reflection traits.