Make 8 methods public and updated input parameter generics for SystemState::build_system_with_input#17034
Merged
alice-i-cecile merged 9 commits intobevyengine:mainfrom Dec 30, 2024
Conversation
PixelDust22
commented
Dec 30, 2024
| Out: 'static, | ||
| Marker, | ||
| F: FnMut(In<Input>, $(SystemParamItem<$param>),*) -> Out | ||
| F: FnMut(Input, $(SystemParamItem<$param>),*) -> Out |
Contributor
Author
There was a problem hiding this comment.
After #15184, the input parameter no longer have to be wrapped in a In
Member
There was a problem hiding this comment.
Interesting. Can we remove In completely in a follow-up then?
ItsDoot
reviewed
Dec 30, 2024
Comment on lines
+663
to
+665
| /// Safety: Modifying the system param states may have unintented consequences. | ||
| /// the param state is generally considered to be owned by the [`SystemParam`]. Modifications | ||
| /// should respect any invariants as required by the [`SystemParam`]. |
Contributor
There was a problem hiding this comment.
It might be helpful to provide an example of when this might be the case, as I'm not sure why it needs to be unsafe.
Contributor
Author
There was a problem hiding this comment.
For example, modifying the system state of ResMut without also updating [SystemMeta::component_access_set] will obviously create issues.
BenjaminBrienen
approved these changes
Dec 30, 2024
alice-i-cecile
approved these changes
Dec 30, 2024
ecoskey
pushed a commit
to ecoskey/bevy
that referenced
this pull request
Jan 6, 2025
…State::build_system_with_input (bevyengine#17034) # Objective - Made certain methods public for advanced use cases. Methods that returns mutable references are marked as unsafe due to the possibility of violating internal lifetime constraint assumptions. - Fixes an issue introduced by bevyengine#15184
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 4, 2025
…State::build_system_with_input (bevyengine#17034) # Objective - Made certain methods public for advanced use cases. Methods that returns mutable references are marked as unsafe due to the possibility of violating internal lifetime constraint assumptions. - Fixes an issue introduced by bevyengine#15184
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