Skip to content

Commit 18de710

Browse files
committed
Fix algorithmic bug causing exponential blowup in dependency analysis
1 parent fe20eac commit 18de710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/BuildSystemIntegration/BuildSystemManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ package actor BuildSystemManager: QueueBasedMessageHandler {
10711071
dependents[dependency, default: []].insert(target)
10721072
// Check if we have already recorded this target with a greater depth, in which case visiting it again will
10731073
// not increase its depth or any of its children.
1074-
if depths[target, default: 0] < depth + 1 {
1074+
if depths[dependency, default: 0] < depth + 1 {
10751075
worksList.append((dependency, depth + 1))
10761076
}
10771077
}

0 commit comments

Comments
 (0)