Skip to content

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

Merged
maccesch merged 0 commit intobevyengine:mainfrom
Synphonyte:main
Aug 5, 2022
Merged

WIP: Implemented #[bundle(ignore)] and #[bundle(nest)]#5578
maccesch merged 0 commit intobevyengine:mainfrom
Synphonyte:main

Conversation

@maccesch
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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