-
Notifications
You must be signed in to change notification settings - Fork 204
[Incremental, Testing] Implement 7 more removal tests. #702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please test |
@swift-ci please test |
.readGraph, | ||
.enablingCrossModule, | ||
.maySkip("main", "other", "another"), | ||
.missing("another"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I am misreading things, but in this case, "another"
is the input for which we removed the swiftdeps file above, right? Should it not then be removedInput
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! Thank you.
graph.ensureOmits(name: topLevelName) | ||
if removeInputFromInvocation { | ||
if afterRestoringBadPriors { | ||
// FIXME: Fix the driver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a little bit more detail to this FIXME?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! Adding the following: ```
// If you incrementally compile with a.swift and b.swift,
// at the end, the driver saves a serialized ModuleDependencyGraph
// contains nodes for declarations defined in both files.
// If you then later remove b.swift and recompile, the driver will
// see that a file was removed (via comparisons with the saved `BuildRecord`
// and will delete the saved priors. However, if for some reason the
// saved priors are not deleted, the driver will read saved priors
// containing entries for the deleted file. This test simulates that
// condition by restoring the deleted priors. The driver ought to be fixed
// to cull any entries for removed files from the deserialized priors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if the above needs anything--thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
@swift-ci please test |
rdar://77998890 |
Tests all combinations of
removeInputFromInvocation
,removeSwiftDepsFile
, &restoreBadPriors
.The last condition simulates a case where a file is removed but somehow the driver does not get to remove the priors, which has entries for the removed file.
For that condition, the test passes but prints out a warning.
A subsequent PR will fix this issue.