-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Allow @available(swift, ...) nested within @available(macOS, ...) #15213
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
Allow @available(swift, ...) nested within @available(macOS, ...) #15213
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
What about a test for multiple attributes, like:
and
Should it warn? |
Ah, I see no reason why the existing code wouldn't work for that, but it's a good test to have! Thanks for the suggestion. |
Previously, we treated this as an attempt to widen the availability of a member beyond its context, but it's really a different axis of availability. Also, warn about using @available on extensions without an OS, which we just completely ignore right now. rdar://problem/32632327
It looks like we exposed a bunch of Metal APIs to Swift 3 that we didn't mean to; at this point it would be a source-breaking change to hide them. Oops.
75d107a
to
74a4adc
Compare
@swift-ci Please test |
Build failed |
Build failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it's the two failures that @davezarzycki was seeing earlier. Except I did rebase… |
@swift-ci Please test macOS |
Hi @jrose-apple – I may be grasping at straws here, but I'm seeing seemingly random but repeatable/inexplicable test time outs in other scenarios too. For example, @xedin made what a seemingly harmless change in #15134 that caused two simple/fast tests to start timing out on my Linux box. Do the timeouts in this pull request go away if you remove |
It seems like these failures are sporadic, I saw them happen couple of times on Linux CI even before my changes went in. |
I'm not sure that what you saw on Linux was related to the OpenCL and SceneKit tests on macOS, because it's always those two tests. I asked Mishal to take a look at the particular bot that's been running our tests—turns out it was one specific machine for at least my failure and one of yours—and he said he'd take it offline for now. Linux tests have been bumping up against the timeouts for a while over the last few months. I wonder if there are one or two long-running tests there and/or if we've regressed on something, but no one's looked into it yet that I know of. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Previously, we treated this as an attempt to widen the availability of a member beyond its context, but it's really a different axis of availability.
Also, warn about using
@available
on extensions without an OS, which we just completely ignore right now.rdar://problem/32632327