Skip to content

Commit 44acd0d

Browse files
authored
Merge pull request #1325 from ahoppen/fix-topological-sorting
Fix issue that caused topological order to be incorrect
2 parents 46f5b64 + ce34ec2 commit 44acd0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SKSwiftPMWorkspace/SwiftPMBuildSystem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ extension SwiftPMBuildSystem: SKCore.BuildSystem {
433433
public func topologicalSort(of targets: [ConfiguredTarget]) -> [ConfiguredTarget]? {
434434
return targets.sorted { (lhs: ConfiguredTarget, rhs: ConfiguredTarget) -> Bool in
435435
let lhsIndex = self.targets[lhs]?.index ?? self.targets.count
436-
let rhsIndex = self.targets[lhs]?.index ?? self.targets.count
436+
let rhsIndex = self.targets[rhs]?.index ?? self.targets.count
437437
return lhsIndex < rhsIndex
438438
}
439439
}

0 commit comments

Comments
 (0)