Skip to content

[TypeChecker] Rephrase platforms in availability diagnostics #24334

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
merged 2 commits into from
May 6, 2019

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Apr 27, 2019

This does several different things to improve how platforms are described in availability diagnostics:

• Mentions the platform in diagnostics for platform-specific @available(unavailable) attributes.
• Replaces “OS X” with “macOS”.
• Replaces “fooOS application extension” with “application extensions for fooOS”.
• Replaces “on fooOS” with “in fooOS”.

Fixes rdar://problem/49963341.

(If you want to review this, turn on "Hide whitespace changes" in the diff settings—this PR reindents a lot more code than it actually rewrites.)

@beccadax
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0f33de0a34cebf795e4837e0ae2de38ba0b0c364

@beccadax
Copy link
Contributor Author

CI failure seems to be the bug fixed by #24347.

@beccadax
Copy link
Contributor Author

@swift-ci please test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

A part of swift::diagnoseExplicitUnavailability() that should never run for deprecations looks for them and handles them with “break”. Change this to llvm_unreachable() so we notice if this somehow happens.

This change *should* be NFC; I’m splitting it out from other changes so that bisections can point to it if it causes problems in the future.
@beccadax
Copy link
Contributor Author

beccadax commented Apr 29, 2019

Linux CI failure should be fixed by apple/swift-clang#305.

@beccadax beccadax force-pushed the wherefore-art-thou-api branch from ac280ef to 30ed05f Compare April 29, 2019 20:27
@beccadax
Copy link
Contributor Author

@swift-ci please smoke test linux platform

@beccadax
Copy link
Contributor Author

@swift-ci please test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

@beccadax beccadax marked this pull request as ready for review April 29, 2019 23:39
@beccadax beccadax requested a review from jrose-apple April 30, 2019 01:50
@jrose-apple
Copy link
Contributor

(To be clear, everything else is great. It's just that one message that's not great.)

@beccadax
Copy link
Contributor Author

Going to squash all the fiddling down into a single commit, so brace for a force-push.

This does several different things to improve how platforms are described in availability diagnostics:

• Mentions the platform in diagnostics for platform-specific @available(unavailable) attributes.
• Replaces “OS X” with “macOS”.
• Replaces “fooOS application extension” with “application extensions for fooOS”.
• Replaces “on fooOS” with “in fooOS”.

Fixes <rdar://problem/49963341>.
@beccadax beccadax force-pushed the wherefore-art-thou-api branch from 1208f34 to 3494c0b Compare April 30, 2019 23:34
@beccadax
Copy link
Contributor Author

@swift-ci please test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

@beccadax beccadax changed the title [TypeChecker] Include platform in unavailable diagnostics [TypeChecker] Rephrase platforms in availability diagnostics May 1, 2019
@jakepetroules
Copy link
Contributor

Replaces “on fooOS” with “in fooOS”.

Not sure about this part; I really think "on" makes more sense.

I would suggest something more context-sensitive:

in application extensions for fooOS
on fooOS

@beccadax
Copy link
Contributor Author

beccadax commented May 2, 2019

@swift-ci smoke test

@beccadax
Copy link
Contributor Author

beccadax commented May 6, 2019

I talked to @jakepetroules offline and he agreed to the "on" -> "in" change.

The stars have finally aligned to land this.

@beccadax beccadax merged commit 7311886 into swiftlang:master May 6, 2019
beccadax added a commit to beccadax/swift that referenced this pull request May 10, 2019
 [TypeChecker] Rephrase platforms in availability diagnostics
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.

5 participants