Skip to content
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

Don't look for near-miss witnesses for unavailable requirements. #2604

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: We use unavailable requirements as migration hints, but conformance checking would try a little too hard to actually satisfy them, even though they wouldn't actually be used. This led to errors about the new name not matching the old name.
  • Scope: Every Objective-C delegate protocol where the "omit needless words" heuristic has changed a method cannot be conformed to in Swift. (Oops.)
  • Issue: rdar://problem/26313044 and SR-1514 (and dups). Reviewed by @DougGregor.
  • Risk: Very low. We skip emitting diagnostics about unavailable requirements in more cases, but any crashes/miscompiles resulting from this would already have been possible. User experience will not degrade either.
  • Testing: Added compiler regression tests, verified that the test case in the Radar now works. The SRs have several more test cases as well.

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

We use unavailable requirements as migration hints, but conformance
checking would try a little too hard to actually satisfy them, even
though they wouldn't actually be used. This led to errors about the
/new/ name not matching the /old/ name.

(We now get /two/ diagnostics for using the old name, but we can fix
that later. Filed rdar://problem/26358593.)

rdar://problem/26313044
(cherry picked from commit e003e5e)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@tkremenek tkremenek merged commit eac62a4 into apple:swift-3.0-preview-1-branch May 19, 2016
@jrose-apple jrose-apple deleted the swift-3-fix-conformance-checking branch May 19, 2016 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants