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

WIP: Implemented #[bundle(ignore)] and #[bundle(nest)] #5578

Merged
merged 0 commits into from
Aug 5, 2022

Conversation

maccesch
Copy link
Contributor

@maccesch maccesch commented Aug 5, 2022

Objective

Fixes #5559

Solution

Because the generated method from_components() creates an instance of Self my implementation requires any field type that is marked to be ignored to implement Default.


Migration Guide

In #[derive(Bundle)] structs:

#[bundle] => #[bundle(nest)]

@maccesch maccesch changed the title Implemented #[bundle(ignore)] and #[bundle(nest)] WIP: Implemented #[bundle(ignore)] and #[bundle(nest)] Aug 5, 2022
@maccesch maccesch merged commit 0ffb544 into bevyengine:main Aug 5, 2022
@cart
Copy link
Member

cart commented Aug 5, 2022

Seems like you hit a weird github bug from pushing a hard reset to main to your branch: https://discord.com/channels/691052431525675048/692572690833473578/1004950265767661699

You might need to re-open this PR.

@maccesch
Copy link
Contributor Author

maccesch commented Aug 5, 2022

Thanks! Yeah I created a new one. Is that ok?

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.

Add ability to ignore field of bundle
2 participants