<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ok, here’s what happened:<div class=""><br class=""></div><div class="">1. I had a project that used Swift 2.3 with Xcode 7.</div><div class="">2. I downloaded Xcode 8 beta 1 and used the migrator to migrate to Swift 3 (successfully).</div><div class="">3. I downloaded the Xcode 8 betas, fixing errors as they cropped up due to new proposals.</div><div class="">4. I downloaded Xcode 8 GM, and the project now fails to build due to it reverting back to the 2.3 compiler when I right when opened it (I have no idea how this happened).</div><div class="">5. I trigger the migrator manually, which warns that the project is already on Swift 3. I force it to go through anyways, hoping to have it swap the compiler. It proposes no source changes (since I’ve already done this in previous betas) and it then “fails” for whatever reason.</div><div class="">6. It’s still using the old compiler and my code fails to build.</div><div class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Saagar Jha</span><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Sep 8, 2016, at 19:33, Zhao Xin <<a href="mailto:owenzx@gmail.com" class="">owenzx@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I<div class="gmail_default" style="display:inline"><font face="georgia, serif" class=""> am confused with your situation. You said, "</font>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 </div><span style="font-family:georgia,serif" class="">X<div class="gmail_default" style="font-family:georgia,serif;display:inline">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.</div></span><div class=""><span style="font-family:georgia,serif" class=""><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br class=""></div></span></div><div class=""><span style="font-family:georgia,serif" class=""><div class="gmail_default" style="font-family:georgia,serif;display:inline">Zhaoxin</div></span></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Sep 9, 2016 at 10:26 AM, Saagar Jha <span dir="ltr" class=""><<a href="mailto:saagar@saagarjha.com" target="_blank" class="">saagar@saagarjha.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">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.<span class="HOEnZb"><font color="#888888" class=""><br class=""><div class="">
<br class=""><span style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;" class="">Saagar Jha</span><br style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
</div></font></span><div class=""><div class="h5">
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 8, 2016, at 16:47, Zhao Xin <<a href="mailto:owenzx@gmail.com" target="_blank" class="">owenzx@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:georgia,serif">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.</div><div class="gmail_default" style="font-family:georgia,serif"><br class=""></div><div class="gmail_default" style="font-family:georgia,serif">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. </div><div class="gmail_default" style="font-family:georgia,serif"><br class=""></div><div class="gmail_default" style="font-family:georgia,serif">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.</div><div class="gmail_default" style="font-family:georgia,serif"><br class=""></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Sep 9, 2016 at 5:01 AM, Saagar Jha via swift-users <span dir="ltr" class=""><<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">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?)</div><div class=""><br class=""></div><div class=""><div class="">Thanks,<br class=""><span style="font-family:'SF UI Text';font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Saagar Jha</span><br style="font-family:'SF UI Text';font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br style="font-family:'SF UI Text';font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br style="font-family:'SF UI Text';font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
</div>
<br class=""></div></div><br class="">______________________________<wbr class="">_________________<br class="">
swift-users mailing list<br class="">
<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailma<wbr class="">n/listinfo/swift-users</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>