Skip to content

[PrintAsObjC] Silence -Wnullability for the generated declarations. #10256

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

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Jun 14, 2017

  • Explanation: Since Swift 3 and Swift 4 might have different views of an Objective-C API's nullability, we can end up with incompatible overrides, including with inherited initializers. This is unfortunate but also realistic; the Swift 3 code is not set up to handle the new nullability used by Swift 4 and Objective-C. This change silences -Wnullability for declarations in the generated Objective-C header ("MyApp-Swift.h"), to allow these mismatches.
  • Scope: Affects warnings emitted in generated headers.
  • Radar: rdar://problem/32571301
  • Reviewed by: @milseman
  • Risk: Low
  • Testing: Passed updated compiler regression tests.

…wiftlang#10247)

Since Swift 3 and Swift 4 might have different views of an Objective-C
API's nullability, we can end up with incompatible overrides,
including with inherited initializers. This is unfortunate but also
realistic; the Swift 3 code is /not/ set up to handle the new nullability
used by Swift 4 and Objective-C. Just silence the warning.

(It would be nice to not print inherited initializers at all, but that
would mean making sure there are no convenience initializers we have
to print as well. Otherwise the class would get mistaken for one
without explicit designated initializers.)

rdar://problem/32571301
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - a9c4695
Test requested by - @jrose-apple

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - a9c4695
Test requested by - @jrose-apple

@ematejska
Copy link
Contributor

@swift-ci test os x

@ematejska
Copy link
Contributor

@swift-ci test source compatibility

@ematejska ematejska merged commit 929335b into swiftlang:swift-4.0-branch Jun 15, 2017
@jrose-apple jrose-apple deleted the 4.0-nullability-fragility-compatibility branch June 16, 2017 00:04
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.

3 participants