Xcode 6.4 to 7.1.1 Upgrade Nightmare

This is going to come across as a bit of a rant, but I am really appalled by how horrendous upgrading my project has been (and still is) going from Xcode 6.4 to 7 - despite not even choosing to upgrade to Swift 2.0 yet (I wanted to get my project to compile first).


Well I have had to fix hundreds of errors in dozens of files and I am still working my way out.


What happened to the concept of depreciation that has worked so well in the past? With this "upgrade" - things just don’t exist that were never phased out. Pretty harsh considering I just wrote this project from scratch in Swift not more than a year ago - not like I am trying to port some legacy code or something.


In my more than 5 years as a professional developer, not once has a single upgrade been so miserable. I am just at loss for words.

Replies

Just to clarifiy, as I mentioned in your other thread, If you are using xCode 7.x, you have no choice about using Swift 2.x. You will be using it. The only choice you have is whether you want Xcode to attempt to convert for you (and you complete the process), or if you want to convert all of it yourself.

That isn't at all how I interpreted the message. It really sounds like upgrading to 2.0 is optional.


In any event, that doesn't really change my point - it is still a quagmire. What happened to depreciation?


This is just horrible because I am forced to make hundreds of changes to my code all at once - I can't test my changes one at a time. So this is potentialy a huge can of worms.

I don't remember the exact message, but you may be correct that they could improve the wording to make it clearer. And you are right, it can be difficult to convert; the larger and more complex the app, the more difficult it can be. When Swift was introduced at WWDC 2014, they said that code-breaking changes would occur for a while when new versions of Swift were introduced. As more time goes by, the less likely it is that people will remember that, or will have heard/read it to begin with.

I assumed it would be handled more effectively as it has been in the past - like with depreciation. I just can't beleive this was the best foot forward.

You keep using that word "depreciation" - I do not think it means what you think it means 😀


In any case, this sort of thing is why I didn't even touch Swift until 2.0. I've been through enough similar experiences already - I don't need any more. There's a reason they call early adoption of anything "bleeding edge".

Welcome to Swift 2. If you did not already do that, select Edit->Convert->To latest Swift syntax... in the menu. It will do part of the work for you. You will still need to change some things manually. For example, in my project the auto-generated error handling was atrocious. The bright side is that the errors are basically reminders of differences of syntax (and mental process) between Swift 1 and Swift 2, which you will need to understand anyways.

My bad (autocorrect) I mean deprecated...

I have tried this too - but I had many many errors post conversion and it says only do the conversion once. On top of that - I have an overwhelming number of edits to review and approve before I even can get it to compile. Its really exhausting with a project of my scope.

As for early adoption; when I decided to start an entire new framework and set of applications from the ground up - I cringed at the idea of writing legacy code from the beginning. Apple made it very clear that not only was Swift the future it was whole-heartedly recommended for new projects.

Yes, Swift 2 is required if you are using Swift in Xcode 7.


The issues you are seeing are from the significant changes that have occurred in Swift over the past year. Apple was very clear that it was going to change a great deal, and that many of the changes would break syntax.


The message you refer to when you first open a project with Swift 1 code is the option whether to run a migration tool which can perform many syntax changes automatically to bring it up to date, If you did not do this, then yes you are likely going to be doing a lot of manual editing.


I would suggest that in 5 years of development you have not worked in many languages which started their existence in that time. This kind of rapid change is to be expected.

I understand that its a new language but I fail to see why wouldn't it be handled more like it has in the past; namely deprecating? That allows us to migrate line by line as needed while being able to compile project as a whole; testing and understanding one depracted issue at a time and on our own time. Versus having to figure out and commit hundreds of changes all at once in hopes that everything just works.

Swift 2 has not very many big changes. The biggest is the much wished for new error handling that requiers some rewriting of error handling code.