-
-
Notifications
You must be signed in to change notification settings - Fork 607
[WIP] Swift 3.0 Compatibility #277
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
[WIP] Swift 3.0 Compatibility #277
Conversation
It seems updating test script for Linux is not needed. |
Wow, this looks really great @norio-nomura! I'm especially impressed that you were able to achieve such good 2.2-3.0 compatibility. Could you rebase this when you get a chance? |
Rebased. |
} | ||
} | ||
|
||
public protocol Sequence: SequenceType { |
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.
For supporting uses associatedtype
constraints on some functions, Sequence
is defined as protocol
inheriting SequenceType
.
That would require some SequenceType
types defined on consumer to conform as:
#if !swift(>=3)
extension MyCustomSequence: Nimble.Sequence {}
#endif
Hi @norio-nomura, I'm sorry that there's been so little activity around here for so long. I'm inclined to say that we're best off introducing a Thoughts @norio-nomura @Quick/contributors? |
This PR has already been incompatible with |
I can't say which is better whether supporting swift-2.2 and 3 simultaneously or branching them. |
I'd like to reiterate my thought that XCTest should export both APIs until Swift 3 is officially released: SR-1215. We're doing very little to make things smooth for early adopters of corelibs-xctest, I think we could do better in that respect. |
In light of the comments on this PR, this discussion, and the evidence of the complexity of supporting 2.2 and 3 simultaneously as linked to above, I'm pretty convinced at this point that branching is required here. Additionally, I feel that the @norio-nomura how would you feel about updating this to work with |
Makes sense to me! Theoretically it's possible to have CI build the Swift 3 branch by compiling Swift from source, then passing |
I'd happy to update |
Hmm, I wonder how feasible it would be to download and install a toolchain package until Travis starts getting Xcode betas that include a Swift 3 toolchain? Even if we decide not to do that, the Linux CI should still Just Work here, as it is already downloading and installing the specified dev snapshot. |
If Travis is difficult with OS X builds, I think removing them and keeping Linux for now would be a reasonable compromise. |
We can use Swift 3 with Xcode 7.3 on Travis-CI as following: https://github.com/norio-nomura/SWXMLHash/blob/nn-swift22-and-swift3-compatibility/.travis.yml#L11-L18 |
That looks worth trying to me! |
Rebased and updated to
|
Test cases will need to be `final` for now due to the `Self` reference on the new `allTests` type. Once codegen is available for `allTests` we can get rid of the `final` and the `XCTestCaseProvider` protocol altogether.
Most changes are affected by: [SE-0005](https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md) [SE-0040](https://github.com/apple/swift-evolution/blob/master/proposals/0040-attributecolons.md) [SE-0046](https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md)
Support Xcode 8 beta 6 and Preview 6
Did you have success using this branch of Nimble to tests actual projects? I'm trying to convert my tests to use this version of Nimble with Swift 3 and I have errors everywhere I use |
ReactiveCocoa did: ReactiveCocoa/ReactiveCocoa#3145 |
@raphaelcruzeiro |
Maybe making |
@norio-nomura Agreed. I'm gonna start working on that then ;) |
CGFloat now conforms to NMBDoubleConvertible
Now |
@raphaelcruzeiro: Siesta has been using this fork successfully (and the corresponding Quick fork as well). On the https://github.com/bustoutsolutions/siesta/blob/swift3/Tests/ProgressSpec.swift#L112 I was even able to remove a Thanks, @norio-nomura, for keeping these forks going! |
Now that And yeah! Thanks to @norio-nomura for taking the step forward and getting this branch up and working! |
`CGFloat` is in Foundation (swift-corelibs-foundation) on Linux.
This should be removed once we get the following: swiftlang/swift-corelibs-foundation#585
Add NMBDoubleConvertible conformance to CGFloat on Linux
# Conflicts: # .travis.yml # test
Resolve conflicts with master
I'd like to officially manage Swift 3 migration in this repo and I've created |
@ikesyo Thanks! I have changed base branch to |
Thank you @norio-nomura and all who contributed to Swift 3 support on this PR! 🎉 |
[WIP] Swift 3.0 Compatibility
Quick.xcodeproj: Lower iOS deployment target to 7.0
swift test
on OS X and Linux