-
Notifications
You must be signed in to change notification settings - Fork 263
Update APIs to match some tweaking for Swift3 in Xcode's XCTest. #98
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
@swift-ci please test |
Hmm, looks like a legitimate build error on OS X:
It appears that corelibs-foundation's NSData.swift is using Glibc on all platforms, not just OS X. This needs a platform check. I commented on swiftlang/swift-corelibs-foundation#323, which introduced the change. |
Of course, the OS X corelibs-foundation failure has nothing to do with the changes in this pull request, which look good to me (and pass on Linux). I'll merge this now. Is there a radar or JIRA issue we can use to track the SDK overlay change? It'd be nice to know when the APIs come into sync. |
Thanks @modocache ! |
Looks like the write function may have conflicted with data's; so the commit prefixed it with Glibc. |
Looks like it'll need to be something like: #if os(Linux) || os(FreeBSD) || os(Android)
bytesWritten = Glibc.write(fd, buf.advanced(by: length - bytesRemaining), bytesRemaining)
#else
bytesWritten = Darwin.write(fd, buf.advanced(by: length - bytesRemaining), bytesRemaining)
#endif Boy, I should really follow up on my "unify Darwin and Glibc" evolution proposal! 😝 |
swiftlang/swift-corelibs-foundation#333 is raised to fix NSData cross compilation issue |
This pull request changes 1 API (XCTestSuiteRun's addTest() method, changing it to addTestRun()) to match a similar change that is being made in Xcode's XCTest for Swift 3.
In this particular case, the importer just got it wrong. The Objective-C selector is addTestRun:. Until Xcode ships for Swift 3, this will be an inconsistency in the API, but this is a more or less never used API outside the implementation of XCTest.