[swift-evolution] Moving from Swift 2 to 4
david at hartbit.com
Wed Jul 26 08:07:40 CDT 2017
> On 26 Jul 2017, at 14:37, Jonathan Hull via swift-evolution <swift-evolution at swift.org> wrote:
> Is there a reason why the migration only applies to Swift 3? I have some older files which I haven’t gotten around to upgrading until now, and Xcode Beta says I need to migrate them with an older version of Xcode. Right now, I still have that older version, but once Xcode gets upgraded in the fall it will no longer be possible (or is it a temporary limitation)?
> Seeing as there is a Swift 3 compatibility mode, we should at least provide the ability to migrate from 2->3, seeing as it already exists, no?
It’s not a temporary limitation. The migrator needs to be able to parse the input language before it can do the migration:
1) Xcode 9 doesn’t come with a Swift 2 compiler built in.
2) Even if it did, writing a migrator that could migrate from 2 to 4 would dramatically increase the complexity of the migrator.
3) Even if Xcode tried to automatically migrate 2 -> 3, then 3 -> 4, it would only work in very few cases because you often need to do manual fixes after the migrator has run.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution