File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Sources/SwiftDriver/IncrementalCompilation Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,15 @@ extension ModuleDependencyGraph {
85
85
return true
86
86
}
87
87
}
88
+
89
+ var isCompilingAllInputsNoMatterWhat : Bool {
90
+ switch self {
91
+ case . buildingAfterEachCompilation:
92
+ return true
93
+ case . buildingWithoutAPrior, . updatingFromAPrior, . updatingAfterCompilation:
94
+ return false
95
+ }
96
+ }
88
97
}
89
98
}
90
99
@@ -298,14 +307,14 @@ extension ModuleDependencyGraph {
298
307
? collectNodesInvalidatedByAttemptingToProcess ( fed, info)
299
308
: nil
300
309
301
- if phase == . buildingAfterEachCompilation {
310
+ if phase. isCompilingAllInputsNoMatterWhat {
302
311
// going to compile every input anyway, less work for callers
303
312
return DirectlyInvalidatedNodes ( )
304
313
}
305
314
306
315
/// When building a graph from scratch, an unchanged but new-to-the-graph external dependendcy should be ignored.
307
316
/// Otherwise, it represents an added Import
308
- let callerWantsTheseChanges = ( phase != . buildingWithoutAPrior && isNewToTheGraph) ||
317
+ let callerWantsTheseChanges = ( phase. isUpdating && isNewToTheGraph) ||
309
318
lazyModTimer. hasExternalFileChanged
310
319
311
320
guard callerWantsTheseChanges else {
You can’t perform that action at this time.
0 commit comments