Commit 4dc8fb4
authored
Change the ambiguity_detection test to be more strict. (#23846)
# Objective
- Fixes #23843 by preventing these systems from recurring inside Bevy.
- Note this does not fix this for users of Bevy. They would need to
setup their own "strict" checking.
## Solution
- Disable `auto_insert_apply_deferred` in the `ambiguity_detection`
example. Now these stages won't accidentally resolve these ambiguities,
so they will be detected!
- Stop running the app in `ambiguity_detection` and just manually
initialize the schedules.
- We have to do this otherwise the schedules just panic because they
depend on various resource initializations to be executed by commands
(which were previously being applied by the automatically inserted
`apply_deferred`).
### Caveats:
- The ambiguity_detection CI test now won't detect ambiguities in
runtime-added systems.
- This is not a pattern we use today, and I'd encourage us to **delete**
systems instead so that tooling can grab the systems before the app
runs.
- To clarify, this is **not** ambiguity detection in general - just
Bevy's CI test that is affected.
## Testing
- Ran the examples and all the ambiguities have been fixed in previous
PRs.1 parent c7f2038 commit 4dc8fb4
1 file changed
Lines changed: 31 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
79 | | - | |
80 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
81 | 98 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
85 | 108 | | |
86 | 109 | | |
87 | 110 | | |
0 commit comments