@@ -703,7 +703,7 @@ extension IncrementalCompilationTests {
703
703
switch ( removeInputFromInvocation, removeSwiftDepsFile) {
704
704
case ( false , false ) :
705
705
expectations = [
706
- . readGraphAndSkipAll( " main " , " other " , " another " )
706
+ . readGraphAndSkipAll( " main " , " other " , removedInput )
707
707
]
708
708
case
709
709
( true , false ) ,
@@ -718,11 +718,11 @@ extension IncrementalCompilationTests {
718
718
expectations = [
719
719
. readGraph,
720
720
. enablingCrossModule,
721
- . maySkip( " main " , " other " , " another " ) ,
722
- . missing( " another " ) ,
723
- . queuingInitial( " another " ) ,
721
+ . maySkip( " main " , " other " , removedInput ) ,
722
+ . missing( removedInput ) ,
723
+ . queuingInitial( removedInput ) ,
724
724
. skipping( " main " , " other " ) ,
725
- . findingBatchingCompiling( " another " ) ,
725
+ . findingBatchingCompiling( removedInput ) ,
726
726
. schedulingPostCompileJobs,
727
727
. linking,
728
728
. skipped( " main " , " other " ) ,
@@ -798,6 +798,16 @@ extension IncrementalCompilationTests {
798
798
if removeInputFromInvocation {
799
799
if afterRestoringBadPriors {
800
800
// FIXME: Fix the driver
801
+ // If you incrementally compile with a.swift and b.swift,
802
+ // at the end, the driver saves a serialized `ModuleDependencyGraph`
803
+ // contains nodes for declarations defined in both files.
804
+ // If you then later remove b.swift and recompile, the driver will
805
+ // see that a file was removed (via comparisons with the saved `BuildRecord`
806
+ // and will delete the saved priors. However, if for some reason the
807
+ // saved priors are not deleted, the driver will read saved priors
808
+ // containing entries for the deleted file. This test simulates that
809
+ // condition by restoring the deleted priors. The driver ought to be fixed
810
+ // to cull any entries for removed files from the deserialized priors.
801
811
print ( " *** WARNING: skipping checks, driver fails to cleaned out the graph *** " ,
802
812
to: & stderrStream) ; stderrStream. flush ( )
803
813
return graph
0 commit comments