fix multi-output dependency detection #28276
Open
+13
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
collapse_subpackage_nodes only handled outgoing dependencies (not incoming) before deleting nodes so some edges were lost.
by updating edges for both directions, relationships between recipes should be preserved.
for example with the graph:
it updates to:
then deletes the
output-A
node, implicitly deleting the only edge along with it, losing the relationship between the recipes. This PR updates both sides of the subpackage edges to point to the recipe before deleting a node for a subpackage.seen in #28225 where two multi-output packages are added with one dependency between them. If the top-level recipe name doesn't match an output, the packages are built in the wrong order because the subpackage node is deleted. This patch fixes the build order in that PR.