How do I configure swift 3 migrator?

Swift 3 migrator (migration tool, assistant, converter) does too many things at once.

There should be a way to configure it so that it could do the stuff it does incrementally.


Also, I honestly dislike the way it does some of the things.

Like It should leave the old code has a comment on the new code, so that we could spot the difference, specially when it posts those FIX ME messages.


But most importantly, swift 3 now imports objective C headers in a new, better manner, but that requires our swift code to manage these new optionals differently.

To treat these events, the migrator currently just fills our code with a ton of question marks everywhere, which I hate, hate.

It would be much better for it to just force unwrap the imported vars, in these cases, I think.


So I would like to, at the very least, disable this migrator feature, and have it leave the imported objc optionals conflicts for me to deal with later.

Does anyone know how to accomplish this?

Thanks.

Replies

Does anyone know how to accomplish this?

AFAIK the migrator is not configurable. If you have specific cases where you think it’s doing the wrong thing, feel free to file bugs for each one.

Like It should leave the old code has a comment on the new code, so that we could spot the difference …

The way I solve this problem is with source control. I make sure that there are no changes on my working copy before opening the project in Xcode 8. I then let the migrator do its thing, and fix up anything that didn’t migrate properly. Finally, when I go to commit the Swift 3 version, I carefully check each change as part of the commit process.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"