Implemented #[bundle(ignore)] and #[bundle(flatten)]#5628
Closed
maccesch wants to merge 0 commit intobevyengine:mainfrom
Closed
Implemented #[bundle(ignore)] and #[bundle(flatten)]#5628maccesch wants to merge 0 commit intobevyengine:mainfrom
#[bundle(ignore)] and #[bundle(flatten)]#5628maccesch wants to merge 0 commit intobevyengine:mainfrom
Conversation
Contributor
Author
|
@alice-i-cecile Please also add breaking change label |
alice-i-cecile
approved these changes
Aug 9, 2022
Contributor
|
|
Contributor
Author
|
@alice-i-cecile Should I change sth or is this ready? |
Member
|
This is ready :) Just needs more reviews; feel free to ask on Discord. Also ping @aevyrie who wanted this. |
Member
|
I also think I'm on board with the suggestion from @SkiFire13 :) |
alice-i-cecile
approved these changes
Aug 13, 2022
joseph-gio
approved these changes
Aug 25, 2022
Member
joseph-gio
left a comment
There was a problem hiding this comment.
This would be very useful.
#[bundle(ignore)] and #[bundle(nest)]#[bundle(ignore)] and #[bundle(flatten)]
Member
|
Git state definitely got messed up pretty bad here :( Feel free to remake the PR on a new branch if you can't sort it out. |
bors bot
pushed a commit
that referenced
this pull request
Oct 24, 2022
# Objective Fixes #5559 Replaces #5628 ## 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. --- ## Changelog Added the possibility to ignore fields in a bundle with `#[bundle(ignore)]`. Typically used when `PhantomData` needs to be added to a `Bundle`.
bors bot
pushed a commit
that referenced
this pull request
Oct 24, 2022
# Objective Fixes #5559 Replaces #5628 ## 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. --- ## Changelog Added the possibility to ignore fields in a bundle with `#[bundle(ignore)]`. Typically used when `PhantomData` needs to be added to a `Bundle`.
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Oct 28, 2022
# Objective Fixes bevyengine#5559 Replaces bevyengine#5628 ## 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. --- ## Changelog Added the possibility to ignore fields in a bundle with `#[bundle(ignore)]`. Typically used when `PhantomData` needs to be added to a `Bundle`.
Pietrek14
pushed a commit
to Pietrek14/bevy
that referenced
this pull request
Dec 17, 2022
# Objective Fixes bevyengine#5559 Replaces bevyengine#5628 ## 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. --- ## Changelog Added the possibility to ignore fields in a bundle with `#[bundle(ignore)]`. Typically used when `PhantomData` needs to be added to a `Bundle`.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
# Objective Fixes bevyengine#5559 Replaces bevyengine#5628 ## 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. --- ## Changelog Added the possibility to ignore fields in a bundle with `#[bundle(ignore)]`. Typically used when `PhantomData` needs to be added to a `Bundle`.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes #5559
Solution
Because the generated method
from_components()creates an instance ofSelfmy implementation requires any field type that is marked to be ignored to implementDefault.Migration Guide
In
#[derive(Bundle)]structs:#[bundle]=>#[bundle(flatten)]