-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Several small fixes for importing alternate names #7756
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
jrose-apple
merged 5 commits into
swiftlang:master
from
jrose-apple:small-multi-name-import-fixes
Feb 27, 2017
Merged
Several small fixes for importing alternate names #7756
jrose-apple
merged 5 commits into
swiftlang:master
from
jrose-apple:small-multi-name-import-fixes
Feb 27, 2017
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
This shouldn't have any effect since we've never customized how parameter names are imported (body names, not argument labels), but it removes special cases.
This doesn't actually have any effect yet, but if we start importing both Swift 3 and Swift 4 versions of protocol requirements and the non-active one is unavailable, we might mistakenly mark the protocol un-implementable even when the requirements that are needed are all there. (Hopefully we would never make a protocol /less/ available in a newer release, of course.) The test case is designed to catch that.
When a C declaration is marked unavailable with a replacement, we look for the replacement to see how it would be imported into Swift. Make sure we do that with respect to the active language version.
Unlike values, we can't import multiple copies of types under different names and get good results. Instead, we make a typealias that points back to the original type. Make sure this typealias is flagged with whatever version is appropriate, rather than always using "Swift 2".
The compiler itself no longer uses this API but the debugger does, in order to pretty-print option sets. The normal way to test this would be to add an LLDB-side test that uses a framework with versioned API notes. Unfortunately I can't think of a straightforward way to test it Swift-side.
@swift-ci Please test |
Build failed |
@swift-ci Please test macOS |
DougGregor
approved these changes
Feb 27, 2017
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.
These look great, @jrose-apple , thank you!
Late to the party, but +1 from me |
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.
More work in the vein of #6720. These are just small commits; there are still several big pieces:
I suggest reviewing commit-by-commit. These could have been separate PRs but they're all tiny.