-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Add functionality to validate contents of a loaded scanner cache state for incremental scans #78962
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
bbfa13c
to
a5d11e2
Compare
// Initial Scan Client module | ||
// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-interface -Rdependency-scan-cache -serialize-dependency-scan-cache -dependency-scan-cache-path %t/cache.moddepcache -module-cache-path %t/module-cache %t/Client.swift -o %t/deps_initial.json -I %t/Modules -I %S/../Inputs/CHeaders -module-name Client | ||
|
||
// Clean re-scan |
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.
Additional tests added/modified to reflect functionality introduced in this PR in swiftlang/swift-driver#1786.
@swift-ci test |
a5d11e2
to
8b0d74e
Compare
@swift-ci test |
8b0d74e
to
59caf34
Compare
@swift-ci test |
59caf34
to
5dd7bec
Compare
@swift-ci test |
bd3697f
to
efc9d0b
Compare
@swift-ci test |
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.
Other than some timing windows, the overall approach looks good to me.
efc9d0b
to
8976c80
Compare
@swift-ci smoke test |
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.
LGTM
…ded scanner cache state Checking each module dependency info if it is up-to-date with respect to when the cache contents were serialized in a prior scan. - Add a timestamp field to the serialization format for the dependency scanner cache - Add a flag "-validate-prior-dependency-scan-cache" which, when combined with "-load-dependency-scan-cache" will have the scanner prune dependencies from the deserialized cache which have inputs that are newer than the prior scan itself With the above in-place, the scan otherwise proceeds as-is, getting cache hits for entries still valid since the prior scan.
8976c80
to
acb4e84
Compare
@swift-ci smoke test |
Checking each module dependency info if it is up-to-date with respect to when the cache contents were serialized in a prior scan.