-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Adding macOS alias for conditional compilation blocks #3066
Conversation
Maybe add a test?
|
👍 |
I duplicated test/Parse/ConditionalCompilation/x64OSXTarget.swift and updated the condition from OSX to macOS |
Why not add to the existing test file? (Every test has a non-zero startup cost, adding to existing tests is cheaper.) |
@gribozavr because I'm unsure of the protocol and this is my first (technically my second, but the first time just added a line of text) time doing a code submission |
It would be best to add the tests to the existing file. |
@gribozavr And done |
@swift-ci Please test |
@erica Please take a look at the test issues. |
Unfortunately, addPlatformConditionValue doesn't support multiple values for the same condition. (It should probably assert that.) I think we need to canonicalize to a particular value before checking it. If you're busy with other things I can take this on from your starting point. |
@jrose-apple My concern about my patch is that the primary value is ambiguous. |
Right, we only expect one value. I admit I didn't think of changing the matcher to search the whole list instead of just getting the first one, but I think we should keep it unique for now and just canonicalize. |
Alias OSX to macOS for conditional compilation blocks
os()
testStarting in Sierra, Apple's Mac-based OS (OS X) will be renamed "macOS".
The
#if os(OSX)
test should be aliased to#if os(macOS)
.With any luck, I've managed to do this right..
Resolved bug number: (SR-1823)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.