@@ -305,14 +305,6 @@ extension IncrementalCompilationState {
305
305
reporter: reporter)
306
306
307
307
let externallyChangedInputs = computeExternallyChangedInputs (
308
- forIncrementalExternalDependencies: false ,
309
- buildTime: outOfDateBuildRecord. buildTime,
310
- fileSystem: fileSystem,
311
- moduleDependencyGraph: moduleDependencyGraph,
312
- reporter: moduleDependencyGraph. reporter)
313
-
314
- let incrementallyExternallyChangedInputs = computeExternallyChangedInputs (
315
- forIncrementalExternalDependencies: true ,
316
308
buildTime: outOfDateBuildRecord. buildTime,
317
309
fileSystem: fileSystem,
318
310
moduleDependencyGraph: moduleDependencyGraph,
@@ -327,9 +319,9 @@ extension IncrementalCompilationState {
327
319
// Combine to obtain the inputs that definitely must be recompiled.
328
320
let definitelyRequiredInputs =
329
321
Set ( changedInputs. map ( { $0. filePath } ) +
330
- externallyChangedInputs + incrementallyExternallyChangedInputs +
331
- inputsHavingMalformedDependencySources
332
- + inputsMissingOutputs)
322
+ externallyChangedInputs +
323
+ inputsHavingMalformedDependencySources +
324
+ inputsMissingOutputs)
333
325
if let reporter = reporter {
334
326
for scheduledInput in definitelyRequiredInputs. sorted ( by: { $0. file. name < $1. file. name} ) {
335
327
reporter. report ( " Queuing (initial): " , scheduledInput)
@@ -426,26 +418,23 @@ extension IncrementalCompilationState {
426
418
427
419
/// Any files dependent on modified files from other modules must be compiled, too.
428
420
private static func computeExternallyChangedInputs(
429
- forIncrementalExternalDependencies: Bool ,
430
421
buildTime: Date ,
431
422
fileSystem: FileSystem ,
432
423
moduleDependencyGraph: ModuleDependencyGraph ,
433
424
reporter: IncrementalCompilationState . Reporter ?
434
- ) -> [ TypedVirtualPath ] {
435
- var externalDependencySources = Set < ModuleDependencyGraph . DependencySource > ( )
436
- let extDeps = forIncrementalExternalDependencies
437
- ? moduleDependencyGraph. incrementalExternalDependencies
438
- : moduleDependencyGraph. externalDependencies
439
- for extDep in extDeps {
425
+ ) -> [ TypedVirtualPath ] {
426
+ var externalDependencySources = Set < DependencySource > ( )
427
+ for extDepAndPrint in moduleDependencyGraph. fingerprintedExternalDependencies {
428
+ let extDep = extDepAndPrint. externalDependency
440
429
let extModTime = extDep. file. flatMap { try ? fileSystem. getFileInfo ( $0) . modTime}
441
430
?? Date . distantFuture
442
431
if extModTime >= buildTime {
443
- for dependent in moduleDependencyGraph. untracedDependents ( of: extDep , isIncremental : forIncrementalExternalDependencies ) {
432
+ for dependent in moduleDependencyGraph. untracedDependents ( of: extDepAndPrint ) {
444
433
guard let dependencySource = dependent. dependencySource else {
445
434
fatalError ( " Dependent \( dependent) does not have dependencies file! " )
446
435
}
447
436
reporter? . report (
448
- " Queuing because of \( forIncrementalExternalDependencies ? " incremental " : " " ) external dependency on newer \( extDep. file? . basename ?? " extDep? " ) " ,
437
+ " Queuing because of external dependency on newer \( extDep. file? . basename ?? " extDep? " ) " ,
449
438
dependencySource. typedFile)
450
439
externalDependencySources. insert ( dependencySource)
451
440
}
0 commit comments