Skip to content

Commit 3266a05

Browse files
committed
Add migration guide
1 parent 8cd8976 commit 3266a05

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Required components refactor
3+
pull_requests: [20110]
4+
---
5+
6+
The required components feature has been reworked to be more consistent around the priority of the required components and fix some soundness issues. In particular:
7+
8+
- the priority of required components will now always follow a priority given by the depth-first/preorder traversal of the dependency tree. This was mostly the case before with a couple of exceptions that we are now fixing:
9+
- when deriving the `Component` trait, sometimes required components at depth 1 had priority over components at depth 2 even if they came after in the depth-first ordering;
10+
- registering runtime required components followed a breadth-first ordering and used the wrong inheritance depth for derived required components.
11+
- uses of the inheritance depth were removed from the `RequiredComponent` struct and from the methods for registering runtime required components, as it's not unused for the depth-first ordering;
12+
- `Component::register_required_components`, `RequiredComponents::register` and `RequiredComponents::register_by_id` are now `unsafe`;
13+
- `RequiredComponentConstructor`'s only field is now private for safety reasons.

0 commit comments

Comments
 (0)