<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 18, 2017, at 8:54 AM, Maksym Grebenets 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=""><div dir="ltr" class="">Hi all<div class=""><br class=""></div><div class="">I guess like many other iOS devs with c/c++ background I really wanted to get into Swift development one day, at least a tiny bit, at least to understand how things work.</div><div class=""><br class=""></div><div class="">So new refactoring tools and starter tasks finally pulled me in.</div><div class=""><br class=""></div><div class="">With a lot of struggle and a lot of help from community I was able to understand how lit works, how to walk the AST and write changes back to the editor. I've got code and tests for new refactoring kind and new refactoring action, so I was like "yay, time to build the keychain and just try it in Xcode!!!".</div><div class=""><br class=""></div><div class="">That's where I was thrown back to the "what do I do?" state again...</div><div class=""><br class=""></div><div class="">I pulled latest <b class="">master</b> branch and ran <b class="">build-toolchain </b>and all of that just to be told after almost an hour or so that there are 3 failing tests...</div></div></div></blockquote><div><br class=""></div><div>What were the failing tests?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">So I thought:</div><div class=""><br class=""></div><div class="">cd swift</div><div class="">git checkout swift-DEVELOPMENT-SNAPSHOT-2017-09-15-a<br class=""></div><div class="">cd ..</div><div class="">./swift/utils/update-checkout --tag swift-DEVELOPMENT-SNAPSHOT-2017-09-15-a</div><div class=""><br class=""></div><div class="">then build and fail again :(...</div></div></div></blockquote><div><br class=""></div><div>So you are saying that you took the last "known good snapshot" and that also failed. How did it fail? On the same 3 tests?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">OK then, so I just disable the tests and give it another go:</div><div class=""><br class=""></div><div class=""># build-presets.ini</div><div class=""><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre" class=""><div class=""><span style="color:rgb(96,139,78)" class="">#test</span></div><div class=""><span style="color:rgb(96,139,78)" class="">#validation-test</span></div><div class=""><span style="color:rgb(96,139,78)" class="">#long-test</span></div></div></div><div class=""><br class=""></div><div class="">Yay! I got a toolchain!</div><div class="">I copy it over to /Library/Developer/Toolchains/ </div><div class="">Select it in Xcode (latest Xcode 9 GM) and... no luck</div><div class="">The source code highlighting disappears, </div><div class="">I get "An internal error occurred. Source editor functionality is limited..." error.</div><div class="">All of the refactoring actions are disabled.</div><div class=""><br class=""></div><div class="">I guess those 3 failing tests did matter in the end...</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I may be frustrated, because I don't understand what's going on, but I don't feel like giving up.</div><div class=""><br class=""></div><div class="">I'd appreciate any help or advice I can get!</div><div class=""><br class=""></div><div class="">Should I choose an older tag from before to get all tests passing?</div></div></div></blockquote><div><br class=""></div><div>Do you mean before the last known good snapshot? If a snapshot was published on <a href="http://swift.org" class="">swift.org</a>, it /should/ pass all of the tests.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Should I build using Xcode beta rather then GM?<br class=""></div></div></div></blockquote><div><br class=""></div><div>You should be using the Xcode beta. This can be seen either via the README.md under System Requirements for macOS [and don't worry I run into this issue sometimes as well = )]. It is also documented on the CI: <a href="https://ci.swift.org" class="">https://ci.swift.org</a> with a nice link.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Is there any way to build/re-build the OS X toolchain any faster? </div><div class="">Why does it take so long even if I just re-run same command again?</div></div></div></blockquote><div><br class=""></div><div>When you rerun is it not incremental? (I forgot TBH). In terms of the amount of work performed, build-toolchain command is intended to be used for producing snapshots and thus it has to be complete and include code for all platforms/etc. We could potentially have a preset that builds a toolchain only for 1 platform. I am not 100% sure if such a toolchain would work, but it should take significantly less time to build. Would that help?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Where did I get it wrong so the toolchain doesn't really work with Xcode?</div><div class="">Can I connect lldb to process that runs my lit tests?</div><div class=""><br class=""></div><div class="">I'm sorry for having so many questions, but you can imagine there isn't a lot of information for newbies like me trying to get into Swift compiler development. Well, let's just say I couldn't find much :) I've just realized that this mail list is better option that StackOverflow about an hour ago :) Though, of course, I have read Brian Gesiak's posts and the <a href="http://swift.org/" class="">swift.org</a> blog post on refactoring.</div></div></div></blockquote><div><br class=""></div><div>There are no bad questions or too many questions. Welcome to the dev-list = ).</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Just to sum up all of the above, how to I get to build local Xcode toolchain which I can plug in to Xcode and test?</div></div></div></blockquote><div><br class=""></div><div>Answer my questions above... I'll help you get across the finish line.</div><div><br class=""></div><div>On another note, I noticed you mention starter tasks: keep in mind there are more starter tasks than have been documented. If you are interested in a specific area of the compiler and can not find starter tasks in this area, please feel free to send a nice email to this list. I am sure we can find /something/ ; ).</div><div><br class=""></div><div>Michael</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Thank you!</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="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></body></html>