Skip to content

[4.2 EARLY] Revert "'@available' without an OS is ignored on extensions" warning #16324

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

  • Explanation: I added an overzealous warning. It turns out this feature still has some uses at the moment.
  • Scope: Affects people using @available on extensions for useful purposes (permission to use other deprecated or unavailable things).
  • Issue: SR-7577 / rdar://problem/39867773
  • Risk: None. Code is being removed, going back to the way it was before I added this.
  • Testing: Compiler regression tests went back to not warning on this.
  • Reviewer: @huonw

…wiftlang#16298)

This is still useful for the feature where deprecated declarations are
allowed to be used within a context that's marked deprecated. There's
probably a better balance to be found here, because marking the
extension deprecated still does not mark all the members deprecated,
but for now it still has an effect, and we shouldn't produce a warning
for legitimately making use of that effect.

The warning was added in f21d9f3, mostly as an opportunity "fix".

https://bugs.swift.org/browse/SR-7577
(cherry picked from commit 23260b8)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

None of the source compat suite failures can possibly be related to this change. Merging anyway.

@jrose-apple
Copy link
Contributor Author

(most of them are known issues from elsewhere)

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