@@ -368,6 +368,7 @@ final class IncrementalCompilationTests: XCTestCase {
368
368
#if true // sometimes want to skip for debugging
369
369
tryNoChange ( checkDiagnostics)
370
370
tryTouchingOther ( checkDiagnostics)
371
+ tryTouchingBoth ( checkDiagnostics)
371
372
#endif
372
373
tryReplacingMain ( checkDiagnostics)
373
374
}
@@ -417,6 +418,10 @@ final class IncrementalCompilationTests: XCTestCase {
417
418
" Incremental compilation: Queuing (initial): {compile: other.o <= other.swift} " ,
418
419
" Incremental compilation: not scheduling dependents of other.swift; unknown changes " ,
419
420
" Incremental compilation: Skipping input: {compile: main.o <= main.swift} " ,
421
+ " Found 1 batchable job " ,
422
+ " Forming into 1 batch " ,
423
+ " Adding {compile: other.swift} to batch 0 " ,
424
+ " Forming batch job from 1 constituents: other.swift " ,
420
425
" Incremental compilation: Queuing Compiling other.swift " ,
421
426
" Starting Compiling other.swift " ,
422
427
" Finished Compiling other.swift " ,
@@ -425,6 +430,32 @@ final class IncrementalCompilationTests: XCTestCase {
425
430
] ,
426
431
whenAutolinking: autolinkLifecycleExpectations)
427
432
}
433
+ func tryTouchingBoth( _ checkDiagnostics: Bool ) {
434
+ touch ( " main " )
435
+ touch ( " other " )
436
+ try ! doABuild (
437
+ " non-propagating, both touched " ,
438
+ checkDiagnostics: checkDiagnostics,
439
+ expectingRemarks: [
440
+ " Incremental compilation: Scheduing changed input {compile: main.o <= main.swift} " ,
441
+ " Incremental compilation: Scheduing changed input {compile: other.o <= other.swift} " ,
442
+ " Incremental compilation: Queuing (initial): {compile: main.o <= main.swift} " ,
443
+ " Incremental compilation: Queuing (initial): {compile: other.o <= other.swift} " ,
444
+ " Incremental compilation: not scheduling dependents of main.swift; unknown changes " ,
445
+ " Incremental compilation: not scheduling dependents of other.swift; unknown changes " ,
446
+ " Found 2 batchable jobs " ,
447
+ " Forming into 1 batch " ,
448
+ " Adding {compile: main.swift} to batch 0 " ,
449
+ " Adding {compile: other.swift} to batch 0 " ,
450
+ " Forming batch job from 2 constituents: main.swift, other.swift " ,
451
+ " Incremental compilation: Queuing Compiling main.swift, other.swift " ,
452
+ " Starting Compiling main.swift, other.swift " ,
453
+ " Finished Compiling main.swift, other.swift " ,
454
+ " Starting Linking theModule " ,
455
+ " Finished Linking theModule " ,
456
+ ] ,
457
+ whenAutolinking: autolinkLifecycleExpectations)
458
+ }
428
459
429
460
func tryReplacingMain( _ checkDiagnostics: Bool ) {
430
461
replace ( contentsOf: " main " , with: " let foo = \" hello \" " )
@@ -437,6 +468,10 @@ final class IncrementalCompilationTests: XCTestCase {
437
468
" Incremental compilation: Queuing (initial): {compile: main.o <= main.swift} " ,
438
469
" Incremental compilation: not scheduling dependents of main.swift; unknown changes " ,
439
470
" Incremental compilation: Skipping input: {compile: other.o <= other.swift} " ,
471
+ " Found 1 batchable job " ,
472
+ " Forming into 1 batch " ,
473
+ " Adding {compile: main.swift} to batch 0 " ,
474
+ " Forming batch job from 1 constituents: main.swift " ,
440
475
" Incremental compilation: Queuing Compiling main.swift " ,
441
476
" Starting Compiling main.swift " ,
442
477
" Incremental compilation: Traced: interface of main.swiftdeps -> interface of top-level name foo -> implementation of other.swiftdeps " ,
0 commit comments