Skip to content

Commit 86e4305

Browse files
author
David Ungar
committed
Address review.
1 parent 82460c3 commit 86e4305

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,11 @@ extension ModuleDependencyGraph {
377377
private func indiscriminatelyFindNodesInvalidated(
378378
by integrand: ExternalIntegrand
379379
) -> DirectlyInvalidatedNodeSet {
380-
if let reason = whyIndiscriminatelyFindNodesInvalidated(by: integrand) {
381-
return collectUntracedNodes(thatUse: integrand.externalDependency, reason)
380+
guard let reason = whyIndiscriminatelyFindNodesInvalidated(by: integrand)
381+
else {
382+
return DirectlyInvalidatedNodeSet()
382383
}
383-
return DirectlyInvalidatedNodeSet()
384+
return collectUntracedNodes(thatUse: integrand.externalDependency, reason)
384385
}
385386

386387
/// Figure out the reason to integrate, (i.e. process) a dependency that will be read and integrated.
@@ -455,7 +456,7 @@ extension ModuleDependencyGraph {
455456
///
456457
/// If not using incremental imports, a given build may have to invalidate nodes more than once for the same `swiftmodule`:
457458
/// For example, on a clean build, as each initial `swiftdeps` is integrated, if the file uses a changed `swiftmodule`,
458-
/// iit must be scheduled for recompilation. Thus invalidation happens for every dependent input file.
459+
/// it must be scheduled for recompilation. Thus invalidation happens for every dependent input file.
459460
fileprivate struct ExternalDependencyCurrencyCache {
460461
private let fileSystem: FileSystem
461462
private let buildStartTime: Date

Tests/IncrementalTestFramework/CompiledSourceCollector.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import TestUtilities
2121
/// - seealso: Test
2222
struct CompiledSourceCollector {
2323
private var collectedCompiledBasenames = [String]()
24-
private var collectedReadDependenciesInOrder = [String]()
2524
private var collectedReadDependencies = Set<String>()
2625

2726
private func getCompiledBasenames(from d: Diagnostic) -> [String] {
@@ -50,7 +49,6 @@ struct CompiledSourceCollector {
5049
}
5150

5251
private mutating func appendReadDependency(_ dep: String) {
53-
collectedReadDependenciesInOrder.append(dep)
5452
let wasNew = collectedReadDependencies.insert(dep).inserted
5553
guard wasNew || dep.hasSuffix(FileType.swift.rawValue)
5654
else {

0 commit comments

Comments
 (0)