Skip to content

[4.0] [SE-0160] Make deprecated @objc inference warnings opt-in. #9183

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

DougGregor
Copy link
Member

@DougGregor DougGregor commented May 2, 2017

The warnings about deprecated @objc inference in Swift 3 mode can be a
bit annoying; and are mostly relevant to the migration workflow. Make
the warning emission a three-state switch:

  • None (the default): don't warn about these issues.
  • Minimal (-warn-swift3-objc-inference-minimal): warn about direct
    uses of Objective-C entrypoints and provide @objc Fix-Its for them.
  • Complete (-warn-swift3-objc-inference-complete): warn about all
    cases where Swift 3 infers @objc but Swift 4 will not.

Fixes rdar://problem/31922278.

(cherry picked from commit 66b11cb)

The warnings about deprecated @objc inference in Swift 3 mode can be a
bit annoying; and are mostly relevant to the migration workflow. Make
the warning emission a three-state switch:

* None (the default): don't warn about these issues.
* Minimal (-warn-swift3-objc-inference-minimal): warn about direct
  uses of @objc entrypoints and provide "@objc" Fix-Its for them.
* Complete (-warn-swift3-objc-inference-complete): warn about all
  cases where Swift 3 infers @objc but Swift 4 will not.

Fixes rdar://problem/31922278.

(cherry picked from commit 66b11cb)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit d7a3513 into swiftlang:swift-4.0-branch May 2, 2017
@DougGregor DougGregor deleted the se-0160-disable-warnings-by-default-4.0 branch May 2, 2017 17:57
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.

1 participant