Skip to content

Commit 5df8f3d

Browse files
authored
Merge pull request #2218 from josh-arnold-1/targetDepthsAndDependents-performance-fix
Fix algorithmic bug causing exponential blowup in dependency analysis
2 parents 873d47b + 18de710 commit 5df8f3d

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)