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

"serialize" feature no longer enables the optional "bevy_scene" feature if it's not enabled from elsewhere #9803

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

nxsaken
Copy link
Contributor

@nxsaken nxsaken commented Sep 14, 2023

Objective

Fixes #9787

Solution

"serialize" feature enables "bevy_asset" now
"serialize" feature no longer enables the optional "bevy_scene" feature if it's not enabled from elsewhere (thanks to @mockersf)

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to change it here:

serialize = ["bevy_core/serialize", "bevy_input/serialize", "bevy_time/serialize", "bevy_window/serialize", "bevy_transform/serialize", "bevy_math/serialize", "bevy_scene/serialize"]

bevy_scene is an optional crate, but it's not possible to enable serialize without it.

If you change the line linked above to

serialize = ["bevy_core/serialize", "bevy_input/serialize", "bevy_time/serialize", "bevy_window/serialize", "bevy_transform/serialize", "bevy_math/serialize", "bevy_scene?/serialize"]

it should work

@nxsaken nxsaken requested a review from mockersf September 14, 2023 08:37
@nxsaken
Copy link
Contributor Author

nxsaken commented Sep 14, 2023

Thank you for the helpful pointer! I didn't think to look deeper for the origin of the feature flag, and that Cargo feature is so handy.

@nxsaken nxsaken changed the title "serialize" feature now also enables "bevy_asset" to prevent crashing "serialize" feature no longer enables the optional "bevy_scene" feature if it's not enabled from elsewhere Sep 14, 2023
@james7132 james7132 added this pull request to the merge queue Sep 14, 2023
Merged via the queue into bevyengine:main with commit 0607116 Sep 14, 2023
24 of 25 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
…re if it's not enabled from elsewhere (bevyengine#9803)

# Objective

Fixes bevyengine#9787

## Solution

~~"serialize" feature enables "bevy_asset" now~~
"serialize" feature no longer enables the optional "bevy_scene" feature
if it's not enabled from elsewhere (thanks to @mockersf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with only serialize feature enabled
4 participants