Skip to content

Add support for platform-specific unconditional availability. #807

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

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 4, 2024

This PR adds support for the following variant of @available:

@available(macOS, unavailable)
@Test func f() {}

Previously, we were simply ignoring these availability attributes.

Resolves rdar://137776333.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR adds support for the following variant of `@available`:

```swift
@available(macOS, unavailable)
@test func f() {}
```

Previously, we were simply ignoring these availability attributes.

Resolves rdar://137776333.
@grynspan grynspan added the bug 🪲 Something isn't working label Nov 4, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Nov 4, 2024
@grynspan grynspan self-assigned this Nov 4, 2024
@grynspan
Copy link
Contributor Author

grynspan commented Nov 4, 2024

@swift-ci test

@stmontgomery
Copy link
Contributor

We should consider adding this to some DocC article as a recommended workflow for disabling a test on an entire platform, as an alternative to .enabled(if: ...) in that situation.

@grynspan grynspan merged commit ba836db into main Nov 4, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/137776333-unconditional-per-platform-unavailable branch November 4, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants