Moving from Swift 2 to 4

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?

Thanks,
Jon

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.

David.

···

On 26 Jul 2017, at 14:37, Jonathan Hull via swift-evolution <swift-evolution@swift.org> wrote:

Thanks,
Jon

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

You can also get every previous version of the Xcode IDE[1] via Apple’s developer web site, and use the appropriate Xcode on an OS on which it’s supported to do whatever conversion you need.

  -- Chris

[1] Release versions only, not betas.

···

On Jul 26, 2017, at 5:37 AM, Jonathan Hull via swift-evolution <swift-evolution@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)?