<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Add to debugging the compiler?<br><br><div id="AppleMailSignature">Sent from my iPhone</div><div><br>On Aug 11, 2017, at 11:38 AM, Robert Widmann via swift-dev <<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div>Full disclaimer: I haven’t looked into this bug, so I’m just going to describe higher-level workflow tips.</div><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 11, 2017, at 5:02 AM, Mike Choi via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<div class="">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">Hello Swift community,
<div class=""><br class=""></div>
<div class="">I’m currently trying to debug SR-5556 <a href="https://bugs.swift.org/plugins/servlet/mobile#issue/SR-5556" class="">https://bugs.swift.org/plugins/servlet/mobile#issue/SR-5556</a>. </div>
<div class="">TL;Dr This bug has to do with Xcode not providing a fixit when it should. </div>
<div class=""><br class=""></div></div></div></div></blockquote><div><br class=""></div><div>The way to do what you’re asking for is to build a toolchain, which is far too time-consuming for the debugging workflow you want here. This diagnostic is coming from somewhere in Semantic Analysis, so you just need to take your minimally-reproducing test case and only run the compiler up to that point. To do this in Xcode, since you already have the project in hand, you can do the following:</div><div><br class=""></div><div>- Select the ‘swift’ scheme</div><div>- Pull up the scheme editor (⌘+⇧+<)</div><div>- Select the ‘Arguments’ tab and click the ‘+’</div><div>- (For this particular case) add ‘-frontend -typecheck /Path/To/This/Test/Case.swift’</div><div>- Close the scheme editor</div><div>- Build and run</div><div><br class=""></div><div>~Robert Widmann</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">
<div class="">To proceed, I built Swift and generated an Xcode project but have no idea how to debug the problem. Is there a way for me to input Swift code into the built Swift compiler via Xcode and debug in Xcode??</div>
<div class=""><br class=""></div>
<div class="">If not, what is the usual way to debug something like this?</div>
<div class=""><br class=""></div>
<div class="">Thank you for your time!</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class=""><br class="">
Best,
<div class="">Mike JS. Choi</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class=""><br class="">
<br class="">
<div class=""></div>
</div>
</div>
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-dev mailing list</span><br><span><a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-dev">https://lists.swift.org/mailman/listinfo/swift-dev</a></span><br></div></blockquote></body></html>