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 {
8585 return true
8686 }
8787 }
88+
89+ var isCompilingAllInputsNoMatterWhat : Bool {
90+ switch self {
91+ case . buildingAfterEachCompilation:
92+ return true
93+ case . buildingWithoutAPrior, . updatingFromAPrior, . updatingAfterCompilation:
94+ return false
95+ }
96+ }
8897 }
8998}
9099
@@ -298,14 +307,14 @@ extension ModuleDependencyGraph {
298307 ? collectNodesInvalidatedByAttemptingToProcess ( fed, info)
299308 : nil
300309
301- if phase == . buildingAfterEachCompilation {
310+ if phase. isCompilingAllInputsNoMatterWhat {
302311 // going to compile every input anyway, less work for callers
303312 return DirectlyInvalidatedNodes ( )
304313 }
305314
306315 /// When building a graph from scratch, an unchanged but new-to-the-graph external dependendcy should be ignored.
307316 /// Otherwise, it represents an added Import
308- let callerWantsTheseChanges = ( phase != . buildingWithoutAPrior && isNewToTheGraph) ||
317+ let callerWantsTheseChanges = ( phase. isUpdating && isNewToTheGraph) ||
309318 lazyModTimer. hasExternalFileChanged
310319
311320 guard callerWantsTheseChanges else {
You can’t perform that action at this time.
0 commit comments