bevy/crates/bevy_ecs/src
Edgar Geier 731a6fbb92
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-03 07:53:20 +00:00
..
entity Add EntityMap::clear (#9291) 2023-07-31 22:02:16 +00:00
query Fix safety invariants for WorldQuery::fetch and simplify cloning (#8246) 2023-07-25 21:16:22 +00:00
reflect Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
schedule Fix ambiguous_with breaking run conditions (#9253) 2023-08-03 07:53:20 +00:00
storage Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
system Add a paragraph to the lifetimeless module doc (#9312) 2023-08-02 22:01:56 +00:00
world delete code deprecated in 0.11 (#9128) 2023-07-13 23:35:06 +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 add MutUntyped::map_unchanged (#9194) 2023-07-23 01:17:31 +00:00
component.rs Derive Eq, PartialEq for Tick (#9020) 2023-07-04 19:08:51 +00:00
event.rs Derive debug for ManualEventIterator (#9293) 2023-07-30 15:30:52 +00:00
lib.rs Add the Has world query to bevy_ecs::prelude (#9204) 2023-07-19 11:54:40 +00:00
removal_detection.rs Simplify the ComponentIdFor type (#8845) 2023-06-15 12:57:47 +00:00