[swift-users] Migrating to Swift 3 using Xcode fails

Zhao Xin owenzx at gmail.com
Thu Sep 8 21:33:19 CDT 2016

​ am confused with your situation. You said, "I’ve migrated one of my
projects to Swift 3 previously, with an earlier beta of Xcode.". Then in
Xcode should not using Swift 2.3. Assuming
​code using 2.3 wrongly, you should use Xcode migration tool again, after
that Xcode will use Swift 3.0. You manually change code will not cause
Xcode using Swift 3.0 automatically.


On Fri, Sep 9, 2016 at 10:26 AM, Saagar Jha <saagar at saagarjha.com> wrote:

> I am aware that there were new proposals, and I’ve been following along
> and manually migrating. The errors are due to Xcode using the Swift 2.3
> compiler, which doesn’t like the new Swift 3 syntax (for example, it’s
> complaining that it can’t find the new types that have the NS- prefix
> dropped). I’m just looking for the flag in build settings that switches the
> compilers.
> Saagar Jha
> On Sep 8, 2016, at 16:47, Zhao Xin <owenzx at gmail.com> wrote:
> ​I think you can just use Xcode's tool that you upgrade to Swift 3.0.
> However, I suggest you do a backup of your project first in case this is
> not helpful.
> Also, the errors you saw were probably not because of Xcode converted you
> code to 2.3 automatically. It wouldn't do that. The real reason is that in
> Xcode 6 beta6, a lot of Swift 3.0 accepted proposals were implemented and
> released, which made the Swift 3.0 far more different from the previous
> 3.0.
> Xcode's migration tool is closed sourced and is not part of Swift. ​If you
> have further questions, I suggest you to ask it in Apple's developer forum.
> Zhaoxin
> On Fri, Sep 9, 2016 at 5:01 AM, Saagar Jha via swift-users <
> swift-users at swift.org> wrote:
>> Hi,
>> I’ve migrated one of my projects to Swift 3 previously, with an earlier
>> beta of Xcode. However, after downloading the GM seed, hundreds of errors
>> pop up in my code, since it appears that Xcode has somehow reverted the
>> compiler back to 2.3. Manually migrating using Edit>Convert>To Current
>> Swift Syntax… always fails, due to the fact that the code had been
>> previously migrated. Is there any way to “manually” migrate the code (i.e.
>> change the compiler settings?)
>> Thanks,
>> Saagar Jha
>> _______________________________________________
>> swift-users mailing list
>> swift-users at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160909/64826b7f/attachment.html>

More information about the swift-users mailing list