Skip to content

Commit 3e581ca

Browse files
author
David Ungar
committed
address review comments
1 parent ab1db13 commit 3e581ca

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Tests/SwiftDriverTests/IncrementalCompilationTests.swift

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ extension IncrementalCompilationTests {
703703
switch (removeInputFromInvocation, removeSwiftDepsFile) {
704704
case (false, false):
705705
expectations = [
706-
.readGraphAndSkipAll("main", "other", "another")
706+
.readGraphAndSkipAll("main", "other", removedInput)
707707
]
708708
case
709709
(true, false),
@@ -718,11 +718,11 @@ extension IncrementalCompilationTests {
718718
expectations = [
719719
.readGraph,
720720
.enablingCrossModule,
721-
.maySkip("main", "other", "another"),
722-
.missing("another"),
723-
.queuingInitial("another"),
721+
.maySkip("main", "other", removedInput),
722+
.missing(removedInput),
723+
.queuingInitial(removedInput),
724724
.skipping("main", "other"),
725-
.findingBatchingCompiling("another"),
725+
.findingBatchingCompiling(removedInput),
726726
.schedulingPostCompileJobs,
727727
.linking,
728728
.skipped("main", "other"),
@@ -798,6 +798,16 @@ extension IncrementalCompilationTests {
798798
if removeInputFromInvocation {
799799
if afterRestoringBadPriors {
800800
// 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.
801811
print("*** WARNING: skipping checks, driver fails to cleaned out the graph ***",
802812
to: &stderrStream); stderrStream.flush()
803813
return graph

0 commit comments

Comments
 (0)