Skip to content
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

Swift 3 conversion Xcode 8 GM #228

Merged
merged 18 commits into from Sep 25, 2016
Merged

Swift 3 conversion Xcode 8 GM #228

merged 18 commits into from Sep 25, 2016

Conversation

raphaelcruzeiro
Copy link
Contributor

The project builds and seems to run correctly. Still need to update Quick and Nimble and fix the tests.

@orta
Copy link
Collaborator

orta commented Aug 19, 2016

Rockin' - I think this will also need the travis file updating to Xcode 8 - it's currently 7.3

@raphaelcruzeiro
Copy link
Contributor Author

@orta: I haven't bothered yet with the travis file as Quick and Nimble are still not Swift 3 ready. As soon as they have it working we can start migrating the tests and configuring travis to use the xcode8 image.

@orta
Copy link
Collaborator

orta commented Aug 19, 2016

👌 cool

@raphaelcruzeiro
Copy link
Contributor Author

Also, I just realised that the ~ operator is not working as expected as of Beta 6. I really wish I could run those tests now...

@raphaelcruzeiro
Copy link
Contributor Author

Quick and Nimble have been successfully migrated to Swift 3 (Xcode 8 Beta 6). I'm gonna start fixing the tests for this branch later today 🤘🏼

@robb
Copy link
Owner

robb commented Sep 1, 2016

🤘🏼

@orta
Copy link
Collaborator

orta commented Sep 1, 2016

👍

@orta
Copy link
Collaborator

orta commented Sep 1, 2016

I've just merged #203 to master, so you might have a little bit more porting to do - sorry!

@raphaelcruzeiro
Copy link
Contributor Author

No worries. I'll rebase this branch and port the new code.

@raphaelcruzeiro
Copy link
Contributor Author

I have converted the tests to Swift 3 and all is well except for the Priority operator which has a problem of precedence. I have tried fixing it as per SE-0077 but it seems that I got it wrong as the following test fails to build:

it("should operate on a single constraint") {
    var constraint: NSLayoutConstraint!

    constrain(view) { view in
        constraint = (view.width == 200 ~ 100)
    }

    expect(constraint.priority).to(equal(100))
}

I will take a deeper look into that later today and hopefully a commit will follow 😉

@raphaelcruzeiro
Copy link
Contributor Author

@orta @robb I had no luck in getting the ~ operator working with the new precedencegroup 😞

@raphaelcruzeiro
Copy link
Contributor Author

XCode 8 GM didn't break anything on this branch 😮

@raphaelcruzeiro raphaelcruzeiro changed the title [WIP ] Swift 3 conversion (XCode 8 beta 4) [WIP ] Swift 3 conversion Xcode 8 GM Sep 10, 2016
@orta
Copy link
Collaborator

orta commented Sep 13, 2016

Should also consider switching these deps to CocoaPods, every time I look at the build fails it's because of Carthage using the GitHub API

Anyway, @raphaelcruzeiro - is the ~ and rpecedencegroup a blocker?

@raphaelcruzeiro
Copy link
Contributor Author

@orta I pushed a commit switching to CocoaPods. Hopefully travis will at least get to trying to build the tests. About the ~, I really have no idea how to solve that. From what I understood of SE-0077, the precedence group is correctly set for this operator. However, when trying to build the tests I get a CartographyTests/PrioritySpec.swift:22:49: Ambiguous reference to member '~'.

@orta
Copy link
Collaborator

orta commented Sep 13, 2016

Hrm, I haven't looked at Swift 3 but I remember this tweet perhaps you can try making the name CartographyPriorityGroup ?

@raphaelcruzeiro
Copy link
Contributor Author

I can rename the precedence group to avoid possible name clashes but this will most likely not solve the operator problem.

@orta
Copy link
Collaborator

orta commented Sep 16, 2016

I've made a note and some PR changes in raphaelcruzeiro#1

@orta
Copy link
Collaborator

orta commented Sep 22, 2016

Submitted another PR to hopefully fix CI - raphaelcruzeiro#2

Reference the workspace, and include tvOS in the CI
@orta
Copy link
Collaborator

orta commented Sep 24, 2016

awww, we got one green

@raphaelcruzeiro
Copy link
Contributor Author

@orta 🎉

@orta
Copy link
Collaborator

orta commented Sep 24, 2016

env NSUnbufferedIO=YES the random things you have to do to appease the Xcode gods

OK, IMO this is good to go, will give it a look over tomorrow and give this a good to go, IMO this library has been used in production long enough that this should be the 1.0 given there there is now literally thousands of people relying on it in production

screen shot 2016-09-24 at 22 14 55

@orta orta changed the title [WIP ] Swift 3 conversion Xcode 8 GM Swift 3 conversion Xcode 8 GM Sep 25, 2016
@orta orta merged commit 751b3f8 into robb:master Sep 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants