Coder Social home page Coder Social logo

Swift 2 protocols renamed about box HOT 21 CLOSED

robrix avatar robrix commented on June 29, 2024
Swift 2 protocols renamed

from box.

Comments (21)

clarisli avatar clarisli commented on June 29, 2024

I am getting the following errors.

Box.swift:6:37: error: 'Printable' has been renamed to 'CustomStringConvertible'
Box.swift:31:10: error: 'toString' has been renamed to 'String'
Box/MutableBox.swift:8:51: error: 'Printable' has been renamed to 'CustomStringConvertible'
MutableBox.swift:25:10: error: 'toString' has been renamed to 'String'

The errors were caused by ReactiveCocoa that I use.
In ReactiveCocoa's Cartfile, it calls github "antitypical/Result" ~> 0.4.4. I added github "antitypical/Results" "0.4" to my own Cartfile to solve this problem.

from box.

gfontenot avatar gfontenot commented on June 29, 2024

Yeah, this project hasn't been fully updated to support Swift 2.0 because with the advent of indirect, it's not that useful. There is an issue (#26) about needing to update the documentation to reflect this. I don't actually think that there are any Swift 2 compatible libraries using Box as a dependency at this point, either.

Would either of you be interested in opening a PR to flesh out the Swift 2.0 support?

from box.

philipengberg avatar philipengberg commented on June 29, 2024

The newest version of ReactiveCocoa as a cocoapod has a dependency to Box, which is what caused this error for me.

from box.

philipengberg avatar philipengberg commented on June 29, 2024

Verstion 3.0.0 of ReactiveCocoa only uses Swift 1.2, but I guess that since my base SDK is iOS 9, Xcode tries to compile it as Swift 2?

from box.

gfontenot avatar gfontenot commented on June 29, 2024

That's because you're using Xcode 7. You'd need to use the swift2 branch of RAC (or the 4.0 prerelease) to get Swift 2.0 support.

from box.

philipengberg avatar philipengberg commented on June 29, 2024

Yeah, but that's only in alpha. Don't feel comfortable using that in large scale production app šŸ˜‰ It just seems weird that you are forced to use Swift 2 in Xcode 7. It basically makes ReactiveCocoa 3.0 useless.

from box.

gfontenot avatar gfontenot commented on June 29, 2024

It just seems weird that you are forced to use Swift 2 in Xcode 7

I agree. Unfortunately that's the world we live in.

from box.

jrmsklar avatar jrmsklar commented on June 29, 2024

I'm seeing that same issue with ReactiveCocoa 3.0.

from box.

neilpa avatar neilpa commented on June 29, 2024

@jrmsklar RAC 3 targets Swift 1.2 so this shouldn't be a problem. Unless you're trying to build RAC 3 w/ Xcode 7/Swift 2 which isn't going to work.

from box.

philipengberg avatar philipengberg commented on June 29, 2024

Which is exactly why I (and everybody else) is doing.

from box.

neilpa avatar neilpa commented on June 29, 2024

What I'm saying is that RAC 3 won't ever build with Xcode 7 because Swift 2 has lots of breaking changes. You have to use the recently tagged RAC 4 alpha if you want to use Swift 2/Xcode 7.

from box.

philipengberg avatar philipengberg commented on June 29, 2024

Yes, I am completely aware of that by now, but that does not change the fact that RAC 3 is unusable to anyone who has to support iOS 9 actively.

from box.

neilpa avatar neilpa commented on June 29, 2024

Supporting iOS 9 devices doesn't require building with the latest tools and SDKs. Apps built against the iOS 8 SDK with Xcode 6.4 run just fine on iOS 9. If you want to be on the latest tooling you have to expect some libraries will lag behind.

from box.

neilpa avatar neilpa commented on June 29, 2024

Besides, there is a version of RAC for Xcode 7. It's just not baked for long enough yet which is why it's still labelled as an alpha build.

from box.

philipengberg avatar philipengberg commented on June 29, 2024

Again, I know. But as I said, if you actively have to support iOS 9 specific features all you can do is use RAC 2.5 and hope that Apple will not make as many syntactic breaking changes to the next version of Swift, so that third party libraries don't have to play as much catch up. Otherwise people will be stuck with old Obj-C libraries for the sake of syntactic sugar and language features.

from box.

robrix avatar robrix commented on June 29, 2024

Leaving aside the question of what one might want this for, Iā€™d be more than happy to accept a PR updating Box to Swift 2.0.

from box.

 avatar commented on June 29, 2024

@robrix As far as I understand this issue, commits f152f11 and e633c97 should already fix this problem. Those commits were checked in after the latest Box release (1.2.2) tag, though, so they are effectively ignored by Carthage. A new release/tag should make everybody happy.

Edit: Everybody using Xcode 7 and Swift 2, I mean. šŸ˜œ

from box.

jrmsklar avatar jrmsklar commented on June 29, 2024

@neilpa, I'm trying to build for iOS 9 using Xcode 7, which as @philipengberg pointed out is not supported by the latest version of RAC.

from box.

robrix avatar robrix commented on June 29, 2024

@bavarious šŸ‘ thanks.

from box.

jlhonora avatar jlhonora commented on June 29, 2024

+1 for a new release tag!

from box.

robrix avatar robrix commented on June 29, 2024

Tagged 2.0. I believe this should resolve the difficulties, so Iā€™m going to close this out now.

from box.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.