AliSoftware / OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
MIT License
5.03k stars 601 forks source link

Xcode 8.3 and Swift 3.x support #240

Closed Liquidsoul closed 7 years ago

Liquidsoul commented 7 years ago

This pull request is mostly a merge of the swift-3.0 branch to implement #233 :

Once this is merged we will create a swift-2.3 branch to allow users to use the legacy Swift version if they need it.

❓~One thing I am wondering is if the Travis CI configuration should not be updated in this PR to test both Xcode 8.3 and Xcode 8.2? Maybe at least change the osx_image to xcode8.3 instead of xcode8 which from travis' documentation targets some Xcode 8 GM~ πŸ™„ The build matrix has been updated to use Xcode 8.3.

A language badge has been added to the README file. Language: Swift 3.1

AliSoftware commented 7 years ago

I think by now it would be better to have the following branch setup:

Because if today we make master use 3.0 and make a swift-2.3 and swift-3.1 branch we'll later again fall back in the similar issue we have today once 3.1 will be widely adopted.

Thoughts?

AliSoftware commented 7 years ago

❓One thing I am wondering is if the Travis CI configuration should not be updated in this PR to test both Xcode 8.3 and Xcode 8.2?

Yeah probably :+1:

_(Just to be clear, we won't need a build matrix to always build master on all Xcode's, just each branch β€” master, swift-2.3 and swift-3.0 will each have their travis.yml configured with the matching osx_image for the branch)_

Liquidsoul commented 7 years ago

Is there really a difference between Swift 3.1 and Swift 3.0? Because it does not seem to be the case or maybe I am missing something πŸ€”

AliSoftware commented 7 years ago

I don't think there is any code change needed at all. The only requested changes is for Carthage users, again… who will require us to do a branch on which the only difference compared to 3.0 would be the value of SWIFT_VERSION

AliSoftware commented 7 years ago

Side note: we need to migrate OHHTTPStubs to Circle-CI some day… travis is still taking forever :'(

AliSoftware commented 7 years ago

@Liquidsoul Now that this is merged:

Next steps is to:

Liquidsoul commented 7 years ago

@AliSoftware I've just pushed the badge in branch swift2.3.

AliSoftware commented 7 years ago

πŸ‘Œ

krunk4ever commented 7 years ago

I noticed that the releases are versioned as:

Moving forward, will this be switched to?

AliSoftware commented 7 years ago

Yep exactly that's what I plan indeed. Do you think we should do otherwise? Suggestions welcome.

Also wondering if I should bump the next release to 6.0.0 because the switch from 2.3 to 3.0 is source-breaking (I think, will have to compare our APIs for the two versions to check if the call site has to be changed or not πŸ€”)…

krunk4ever commented 7 years ago

I agree you should make 5.2.3 not compatible with the next version since they are not compatible, so πŸ‘ on 6.0.0