-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
change not implemation to custom system struct #8105
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5ed8021
change not implemation to custom system struct
B-Reif 6f5e3db
remove some clone calls
B-Reif f53d33a
manually impl clone, remove clone from marker
B-Reif 858ef20
remove marker type
B-Reif f16e72b
rename, remove readonly bound
B-Reif 6b65346
use std::ops::Not
B-Reif 57f1cb6
relax type requirements
B-Reif 055c7b4
clear world_id, system_meta, and archetype_generation for cloned Func…
B-Reif 3338d57
reorder fields
B-Reif fa0aa35
Update crates/bevy_ecs/src/schedule/condition.rs
B-Reif 3a98270
add doc comments for FunctionSystem and distributive_run_if
B-Reif e68de94
Merge branch 'condition-inverter' of github.com:B-Reif/bevy into cond…
B-Reif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior, while probably correct, is very subtle. It needs to be documented somewhere visible -- perhaps on the
System
trait? Also, maybe it should be documented ondistributive_run_if
, since I think that's the only place we're cloning systems right now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now
Clone
is implemented specifically forFunctionSystem
, and not necessarily for otherSystem
implementers. I think it makes more sense to call it out onFunctionSystem
. I also added a note ondistributive_run_if
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but users will rarely if ever interact with the
FunctionSystem
type directly. I think it's more likely to be seen if theSystem
trait mentions that systems defined using afn
have this property.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed below in 3a98270.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That documented it on
FunctionSystem
, but users have little reason to ever interact with that type or read its documentation. Function systems get automagically created through type magic, so many users are probably only vaguely aware of that type's existence because of compiler errors.