-
Notifications
You must be signed in to change notification settings - Fork 10.5k
A Raft of Fixes To Private Dependencies #32198
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The old tests were just running the type checker because we used to only emit reference dependencies after Sema. Now that we emit them after the pipeline has run, let's upgrade these tests to capture these new references.
Restore the behavior here of only looking at the topmost dependency source object that was lost when the referenced name tracker was removed. Oops.
@swift-ci smoke test |
slavapestov
reviewed
Jun 5, 2020
It wasn't one in the past because the referenced name tracker was written into by unqualified lookup, which would delegate to this request. Now that it's no longer doing that, we have to capture this edge here for private dependencies.
873554f
to
561cc6f
Compare
slavapestov
approved these changes
Jun 5, 2020
In order for private dependencies to be completely correct, it must perform the name lookup unioning step when a cached request is replayed - not just when lookups are first performed. In order to reduce the overhead of this union operation, it is not necessary to walk the entire active request stack, just walk to the nearest cached request in the stack and union into that. When it is popped, its replay step will itself union into the next cached request. To see why, consider a request graph: A* -> B -> C* | -> D* where A, C, and D are cached. If a caller were to force C and D, then force A independenty, today we would *only* replay the names looked up by C and D the first time A was evaluated. That is, subsequent evaluations of A do not replay the correct set of names. If we were to perform the union step during replay as well, requests that force A would also see C and D’s lookups. Without this, callers that force requests like the DeclChecker have to be wary of the way they force the interface type request so other files see the right name sets. rdar://64008262
@swift-ci smoke test |
Just to see what happens here @swift-ci test compiler performance |
(Oops, let's cancel the perf test. I meant to push a different stack of commits before that). |
Compilation-performance test failed |
⛵ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves rdar://64008262