-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - change is_system_type() -> bool
to system_type() -> Option<TypeId>
#7715
Closed
jakobhellermann
wants to merge
1
commit into
bevyengine:main
from
jakobhellermann:system-param-set-type
Closed
[Merged by Bors] - change is_system_type() -> bool
to system_type() -> Option<TypeId>
#7715
jakobhellermann
wants to merge
1
commit into
bevyengine:main
from
jakobhellermann:system-param-set-type
Conversation
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
alice-i-cecile
added
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
labels
Feb 16, 2023
alice-i-cecile
approved these changes
Feb 16, 2023
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.
I think this is generally nicer API.
james7132
approved these changes
Feb 16, 2023
james7132
added
the
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
label
Feb 16, 2023
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Feb 16, 2023
#7715) # Objective - it would be nice to be able to associate a `NodeId` of a system type set to the `NodeId` of the actual system (used in bevy_mod_debugdump) ## Solution - make `system_type` return the type id of the system - that way you can check if a `dyn SystemSet` is the system type set of a `dyn System` - I don't know if this information is already present somewhere else in the scheduler or if there is a better way to expose it
Pull request successfully merged into main. Build succeeded:
|
bors
bot
changed the title
change
[Merged by Bors] - change Feb 16, 2023
is_system_type() -> bool
to system_type() -> Option<TypeId>
is_system_type() -> bool
to system_type() -> Option<TypeId>
myreprise1
pushed a commit
to myreprise1/bevy
that referenced
this pull request
Feb 18, 2023
bevyengine#7715) # Objective - it would be nice to be able to associate a `NodeId` of a system type set to the `NodeId` of the actual system (used in bevy_mod_debugdump) ## Solution - make `system_type` return the type id of the system - that way you can check if a `dyn SystemSet` is the system type set of a `dyn System` - I don't know if this information is already present somewhere else in the scheduler or if there is a better way to expose it
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 21, 2024
…_id` (#12030) ## Objective Always have `some_system.into_system().type_id() == some_system.into_system_set().system_type().unwrap()`. System sets have a `fn system_type() -> Option<TypeId>` that is implemented by `SystemTypeSet` to returning the TypeId of the system's function type. This was implemented in #7715 and is used in `bevy_mod_debugdump` to handle `.after(function)` constraints. Back then, `System::type_id` always also returned the type id of the function item, not of `FunctionSystem<M, F>`. #11728 changes the behaviour of `System::type_id` so that it returns the id of the `FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not change `SystemTypeSet::system_type`, so doing the lookup breaks in `bevy_mod_debugdump`. ## Solution Change `IntoSystemSet` for functions to return a `SystemTypeSet<FunctionSystem>` / `SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
ameknite
pushed a commit
to ameknite/bevy
that referenced
this pull request
Feb 22, 2024
…_id` (bevyengine#12030) ## Objective Always have `some_system.into_system().type_id() == some_system.into_system_set().system_type().unwrap()`. System sets have a `fn system_type() -> Option<TypeId>` that is implemented by `SystemTypeSet` to returning the TypeId of the system's function type. This was implemented in bevyengine#7715 and is used in `bevy_mod_debugdump` to handle `.after(function)` constraints. Back then, `System::type_id` always also returned the type id of the function item, not of `FunctionSystem<M, F>`. bevyengine#11728 changes the behaviour of `System::type_id` so that it returns the id of the `FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not change `SystemTypeSet::system_type`, so doing the lookup breaks in `bevy_mod_debugdump`. ## Solution Change `IntoSystemSet` for functions to return a `SystemTypeSet<FunctionSystem>` / `SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
msvbg
pushed a commit
to msvbg/bevy
that referenced
this pull request
Feb 26, 2024
…_id` (bevyengine#12030) ## Objective Always have `some_system.into_system().type_id() == some_system.into_system_set().system_type().unwrap()`. System sets have a `fn system_type() -> Option<TypeId>` that is implemented by `SystemTypeSet` to returning the TypeId of the system's function type. This was implemented in bevyengine#7715 and is used in `bevy_mod_debugdump` to handle `.after(function)` constraints. Back then, `System::type_id` always also returned the type id of the function item, not of `FunctionSystem<M, F>`. bevyengine#11728 changes the behaviour of `System::type_id` so that it returns the id of the `FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not change `SystemTypeSet::system_type`, so doing the lookup breaks in `bevy_mod_debugdump`. ## Solution Change `IntoSystemSet` for functions to return a `SystemTypeSet<FunctionSystem>` / `SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
msvbg
pushed a commit
to msvbg/bevy
that referenced
this pull request
Feb 26, 2024
…_id` (bevyengine#12030) ## Objective Always have `some_system.into_system().type_id() == some_system.into_system_set().system_type().unwrap()`. System sets have a `fn system_type() -> Option<TypeId>` that is implemented by `SystemTypeSet` to returning the TypeId of the system's function type. This was implemented in bevyengine#7715 and is used in `bevy_mod_debugdump` to handle `.after(function)` constraints. Back then, `System::type_id` always also returned the type id of the function item, not of `FunctionSystem<M, F>`. bevyengine#11728 changes the behaviour of `System::type_id` so that it returns the id of the `FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not change `SystemTypeSet::system_type`, so doing the lookup breaks in `bevy_mod_debugdump`. ## Solution Change `IntoSystemSet` for functions to return a `SystemTypeSet<FunctionSystem>` / `SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
mockersf
pushed a commit
that referenced
this pull request
Feb 27, 2024
…_id` (#12030) ## Objective Always have `some_system.into_system().type_id() == some_system.into_system_set().system_type().unwrap()`. System sets have a `fn system_type() -> Option<TypeId>` that is implemented by `SystemTypeSet` to returning the TypeId of the system's function type. This was implemented in #7715 and is used in `bevy_mod_debugdump` to handle `.after(function)` constraints. Back then, `System::type_id` always also returned the type id of the function item, not of `FunctionSystem<M, F>`. #11728 changes the behaviour of `System::type_id` so that it returns the id of the `FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not change `SystemTypeSet::system_type`, so doing the lookup breaks in `bevy_mod_debugdump`. ## Solution Change `IntoSystemSet` for functions to return a `SystemTypeSet<FunctionSystem>` / `SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
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
NodeId
of a system type set to theNodeId
of the actual system (used in bevy_mod_debugdump)Solution
system_type
return the type id of the systemdyn SystemSet
is the system type set of adyn System