Commit f8964a4
authored
Improve Debug names for SystemTypeSet. (#22499)
# Objective
- Debug names for `SystemTypeSet` are quite bad. For example, the system
`fn a() {}` gets the `SystemTypeSet` `DebugName` of `SystemTypeSet(fn
bevy_ecs::system::function_system::FunctionSystem<fn(), (), (),
bevy_dev_tools::schedule_data::serde::tests::linear::a>())`. This
includes an extraneous `FunctionSystem` which is only relevant for
dealing with the lack of specialization in Rust, as well as extra In/Out
args - even though the function dictates these.
- This is a step towards #10981.
## Solution
- Make `SystemTypeSet` store the function, not the wrapper (e.g.,
`FunctionSystem`). This should be safe since, a system can only ever
have one of either `FunctionSystem` or `ExclusiveFunctionSystem` -
either way, this implementation is unique so `SystemTypeSet<F>` will
never overlap.
- Change debug printing for `SystemTypeSet` to just debug print as
`SystemTypeSet:system_name_goes_here`.
## Testing
- Tests still pass.1 parent 912214a commit f8964a4
File tree
3 files changed
+9
-11
lines changed- crates/bevy_ecs/src
- schedule
- system
3 files changed
+9
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 199 | + | |
202 | 200 | | |
203 | 201 | | |
204 | 202 | | |
| |||
293 | 291 | | |
294 | 292 | | |
295 | 293 | | |
296 | | - | |
| 294 | + | |
297 | 295 | | |
298 | 296 | | |
299 | 297 | | |
300 | | - | |
| 298 | + | |
301 | 299 | | |
302 | 300 | | |
303 | 301 | | |
| |||
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
311 | | - | |
| 309 | + | |
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
315 | | - | |
| 313 | + | |
316 | 314 | | |
317 | 315 | | |
318 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
| 757 | + | |
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| |||
0 commit comments