bevy/crates/bevy_ecs/src
Edgar Geier fefa8ea53b Fix ambiguous_with breaking run conditions (#9253)
# Objective

- Fixes #9114

## Solution

Inside `ScheduleGraph::build_schedule()` the variable `node_count =
self.systems.len() + self.system_sets.len()` is used to calculate the
indices for the `reachable` bitset derived from `self.hierarchy.graph`.
However, the number of nodes inside `self.hierarchy.graph` does not
always correspond to `self.systems.len() + self.system_sets.len()` when
`ambiguous_with` is used, because an ambiguous set is added to
`system_sets` (because we need an `NodeId` for the ambiguity graph)
without adding a node to `self.hierarchy`.

In this PR, we rename `node_count` to the more descriptive name
`hg_node_count` and set it to `self.hierarchy.graph.node_count()`.

---------

Co-authored-by: James Liu <contact@jamessliu.com>
2023-08-09 18:06:37 -07:00
..
entity Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
query Add optional single-threaded feature to bevy_ecs/bevy_tasks (#6690) 2023-07-09 04:22:15 +00:00
reflect bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
schedule Fix ambiguous_with breaking run conditions (#9253) 2023-08-09 18:06:37 -07:00
storage Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
system Add/fix track_caller attribute on panicking entity accessor methods (#8951) 2023-06-26 18:35:11 +00:00
world Provide access to world storages via UnsafeWorldCell (#8987) 2023-06-29 01:29:34 +00:00
archetype.rs Fix typo in Archetypes documentation (#8990) 2023-06-28 19:33:18 +00:00
bundle.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
change_detection.rs Allow unsized types as mapped value in Ref::map (#8817) 2023-06-12 17:52:11 +00:00
component.rs Derive Eq, PartialEq for Tick (#9020) 2023-07-04 19:08:51 +00:00
event.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
lib.rs Implement WorldQuery for EntityRef (#6960) 2023-06-22 21:20:00 +00:00
removal_detection.rs Simplify the ComponentIdFor type (#8845) 2023-06-15 12:57:47 +00:00