<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="">Can you do a new clean build and post the log?<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 19, 2017, at 4:11 PM, Maksym Grebenets &lt;<a href="mailto:mgrebenets@gmail.com" class="">mgrebenets@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Sure, I've put it in a gist here:&nbsp;<a href="https://gist.github.com/mgrebenets/9f50bc07615002cfe6ebb3a9f74cb3de" class="">https://gist.github.com/mgrebenets/9f50bc07615002cfe6ebb3a9f74cb3de</a><div class=""><br class=""></div><div class="">Cheers.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 20, 2017 at 5:46 AM, Michael Gottesman <span dir="ltr" class="">&lt;<a href="mailto:mgottesman@apple.com" target="_blank" class="">mgottesman@apple.com</a>&gt;</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="">Hey Maksym. Your email was too big b/c of the attachment. Can you put the attachment into a pastebin or something like that?<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Sep 19, 2017, at 12:35 AM, Maksym Grebenets &lt;<a href="mailto:mgrebenets@gmail.com" target="_blank" class="">mgrebenets@gmail.com</a>&gt; wrote:</div><br class="m_179408789538515162Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">Hi Michael<div class=""><br class=""></div><div class="">Thanks for the feedback!</div><div class=""><br class=""></div><div class="">I gave it another go and this time made sure I have a proper setup.</div><div class=""><br class=""></div><div class=""><p class="m_179408789538515162gmail-p1"><b class="">./swift/utils/update-checkout --clone<br class="">./swift/utils/update-checkout --tag swift-DEVELOPMENT-SNAPSHOT-<wbr class="">2017-09-18-a</b></p><p class="m_179408789538515162gmail-p1">I've double checked all the submodules directories to make sure the tag was properly checked out.</p><p class="m_179408789538515162gmail-p1">Next I've configured Xcode with this command:</p><div class=""><br class="m_179408789538515162webkit-block-placeholder"></div><p class="m_179408789538515162gmail-p1"><b class="">sudo xcode-select -s /Applications/Xcode-beta.app/<wbr class="">Contents/Developer</b></p><p class="m_179408789538515162gmail-p1">The<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">xcodebuild -version<span class="m_179408789538515162Apple-converted-space">&nbsp;</span></b>output is:<br class=""></p><p class="m_179408789538515162gmail-p1"><b class="">Xcode 9.0<br class="">Build version 9M214v</b></p><p class="m_179408789538515162gmail-p1">And the Host OS is<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">10.12.6</b>, which matches requirements on CI:&nbsp;<a href="https://ci.swift.org/" target="_blank" class="">https://ci.swift.org/</a>.</p><p class="m_179408789538515162gmail-p1">With all that configured I finally kick off the build:</p><div class=""><br class="m_179408789538515162webkit-block-placeholder"></div><p class="m_179408789538515162gmail-p1"><b class="">./swift/utils/build-toolchain swift.local | tee build.log</b></p><p class="m_179408789538515162gmail-p1">After about 2+ hours it ends up with same 3 failures:</p><p class="m_179408789538515162gmail-p1"><b class="">Failing Tests (3):</b></p><p class="m_179408789538515162gmail-p1"><b class="">&nbsp; &nbsp; Swift(iphonesimulator-i386) :: stdlib/Character.swift<br class="">&nbsp; &nbsp; Swift(iphonesimulator-i386) :: stdlib/CodableTests.swift<br class="">&nbsp; &nbsp; Swift(iphonesimulator-i386) :: stdlib/MapKit.swift</b></p><p class="m_179408789538515162gmail-p1"><b class="">&nbsp; Expected Passes &nbsp; &nbsp;: 9957<br class="">&nbsp; Expected Failures &nbsp;: 27<br class="">&nbsp; Unsupported Tests &nbsp;: 446<br class="">&nbsp; Unexpected Failures: 3</b></p><p class="m_179408789538515162gmail-p1">Here's log for one of the failing tests:</p><p class="m_179408789538515162gmail-p1"><br class=""></p></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class=""><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1"><br class=""></p><p class="m_179408789538515162gmail-p1">********************</p><p class="m_179408789538515162gmail-p1">Testing: 0</p><p class="m_179408789538515162gmail-p1">FAIL: Swift(iphonesimulator-i386) :: stdlib/MapKit.swift (566 of 10433)</p><p class="m_179408789538515162gmail-p1">******************** TEST 'Swift(iphonesimulator-i386) :: stdlib/MapKit.swift' FAILED ********************</p><p class="m_179408789538515162gmail-p1">Script:</p><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1">rm -rf /Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/test-<wbr class="">iphonesimulator-i386/stdlib/<wbr class="">Output/MapKit.swift.tmp &amp;&amp; mkdir -p /Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/test-<wbr class="">iphonesimulator-i386/stdlib/<wbr class="">Output/MapKit.swift.tmp &amp;&amp; xcrun --toolchain default --sdk /Applications/Xcode-beta.app/<wbr class="">Contents/Developer/Platforms/<wbr class="">iPhoneSimulator.platform/<wbr class="">Developer/SDKs/<wbr class="">iPhoneSimulator11.0.sdk /Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/bin/swiftc -target i386-apple-ios7.0 &nbsp;-module-cache-path '/var/folders/vs/50_<wbr class="">hfsmx4m1cpwbn7j3x6r6c0000gp/T/<wbr class="">swift-testsuite-clang-module-<wbr class="">cachefYcCzs' -F /Applications/Xcode-beta.app/<wbr class="">Contents/Developer/Platforms/<wbr class="">iPhoneSimulator.platform/<wbr class="">Developer/SDKs/<wbr class="">iPhoneSimulator11.0.sdk/../../<wbr class="">../Developer/Library/<wbr class="">Frameworks &nbsp;-swift-version 3 &nbsp;-module-cache-path '/var/folders/vs/50_<wbr class="">hfsmx4m1cpwbn7j3x6r6c0000gp/T/<wbr class="">swift-testsuite-clang-module-<wbr class="">cachefYcCzs' /Users/grebenma/Projects/oss/<wbr class="">swift/swift/test/stdlib/<wbr class="">MapKit.swift -o /Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/test-<wbr class="">iphonesimulator-i386/stdlib/<wbr class="">Output/MapKit.swift.tmp/a.out -module-name main &amp;&amp; xcrun --toolchain default --sdk /Applications/Xcode-beta.app/<wbr class="">Contents/Developer/Platforms/<wbr class="">iPhoneSimulator.platform/<wbr class="">Developer/SDKs/<wbr class="">iPhoneSimulator11.0.sdk simctl spawn 'iPhone 5' &nbsp;/Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/test-<wbr class="">iphonesimulator-i386/stdlib/<wbr class="">Output/MapKit.swift.tmp/a.out</p><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1">Exit Code: 134</p><p class="m_179408789538515162gmail-p1"><br class=""></p><p class="m_179408789538515162gmail-p1">Command Output (stdout):</p><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1">[ RUN &nbsp; &nbsp; &nbsp;] MapKit.NSValue bridging</p><p class="m_179408789538515162gmail-p1">stdout&gt;&gt;&gt; check failed at /Users/grebenma/Projects/oss/<wbr class="">swift/swift/stdlib/private/<wbr class="">StdlibUnittestFoundationExtras<wbr class="">/<wbr class="">StdlibUnittestFoundationExtras<wbr class="">.swift, line 130</p><p class="m_179408789538515162gmail-p1">stdout&gt;&gt;&gt; expected: &lt;00000000 00003140 00000000 00004340&gt; (of type NSConcreteValue)</p><p class="m_179408789538515162gmail-p1">stdout&gt;&gt;&gt; actual: &lt;00000000 00003140 00000000 00004340&gt; (of type NSConcreteValue)</p><p class="m_179408789538515162gmail-p1">[ &nbsp; &nbsp; FAIL ] MapKit.NSValue bridging</p><p class="m_179408789538515162gmail-p1">MapKit: Some tests failed, aborting</p><p class="m_179408789538515162gmail-p1">UXPASS: []</p><p class="m_179408789538515162gmail-p1">FAIL: ["NSValue bridging"]</p><p class="m_179408789538515162gmail-p1">SKIP: []</p><p class="m_179408789538515162gmail-p1">To debug, run:</p><p class="m_179408789538515162gmail-p1">$ /Users/grebenma/Projects/oss/<wbr class="">swift/build/buildbot_osx/<wbr class="">swift-macosx-x86_64/test-<wbr class="">iphonesimulator-i386/stdlib/<wbr class="">Output/MapKit.swift.tmp/a.out --stdlib-unittest-in-process --stdlib-unittest-filter "NSValue bridging"</p><p class="m_179408789538515162gmail-p1"><br class=""></p><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1">Command Output (stderr):</p><p class="m_179408789538515162gmail-p1">--</p><p class="m_179408789538515162gmail-p1">Child process terminated with signal 6: Abort trap</p><p class="m_179408789538515162gmail-p1"><br class=""></p><p class="m_179408789538515162gmail-p1">--</p></div></blockquote><div class="">The logs don't make much sense to me, especially since<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">actual</b><span class="m_179408789538515162Apple-converted-space">&nbsp;</span>and<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">expected</b><span class="m_179408789538515162Apple-converted-space">&nbsp;</span>valu<wbr class="">es look the same :shrugs:.</div><div class=""><br class=""></div>I'm not sure if mailing lists accept attachment, but I attached full build log just in case.<div class=""><br class=""></div><div class="">I've also downloaded full console log from build #303 (which builds same snapshot as I have) and I find that that build log is somewhat different but overall has same contents.</div><div class=""><br class=""></div><div class="">So far this is where I got stuck with building toolchain.<br class="">There wasn't much issues with running stuff like</div><div class=""><b class="">swift/utils/build-script --release-debuginfo --debug-swift&nbsp;</b></div><div class="">and then running incremental builds, e.g.&nbsp;</div><div class=""><b class="">ninja -C build/Ninja-<wbr class="">RelWithDebInfoAssert+swift-<wbr class="">DebugAssert/swift-macosx-x86_<wbr class="">64 swift-refactor</b></div><div class=""><br class=""></div><div class="">But when it comes to building the toolchain, this is what I arrived at.&nbsp;</div><div class=""><br class=""></div><div class="">Thanks again for your help!</div><div class=""><br class=""></div><div class="">Max<br class=""><div class=""><br class=""></div></div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class=""><div class="gmail_quote">On Tue, Sep 19, 2017 at 4:58 AM, Michael Gottesman<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:mgottesman@apple.com" target="_blank" class="">mgottesman@apple.<wbr class="">com</a>&gt;</span><span class="m_179408789538515162Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Sep 18, 2017, at 8:54 AM, Maksym Grebenets via swift-dev &lt;<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="m_179408789538515162m_7860436664409470296Apple-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<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">master</b><span class="m_179408789538515162Apple-converted-space">&nbsp;</span>branch and ran<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><b class="">build-toolchain<span class="m_179408789538515162Apple-converted-space">&nbsp;</span></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 class=""><br class=""></div></span><div class="">What were the failing tests?</div><span class=""><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-201<wbr class="">7-09-15-a<br class=""></div><div class="">cd ..</div><div class="">./swift/utils/update-checkout --tag&nbsp;swift-DEVELOPMENT-SNAPSH<wbr class="">OT-2017-09-15-a</div><div class=""><br class=""></div><div class="">then build and fail again :(...</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">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><span class=""><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-wrap" 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/<wbr class="">&nbsp;</div><div class="">Select it in Xcode (latest Xcode 9 GM) and... no luck</div><div class="">The source code highlighting disappears,&nbsp;</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 class=""><br class=""></div></span><div class="">Do you mean before the last known good snapshot? If a snapshot was published on<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><a href="http://swift.org/" target="_blank" class="">swift.org</a>, it /should/ pass all of the tests.</div><span class=""><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 class=""><br class=""></div></span><div class="">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:&nbsp;<a href="https://ci.swift.org/" target="_blank" class="">https://ci.swift.org</a>&nbsp;with a nice link.</div><span class=""><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?&nbsp;</div><div class="">Why does it take so long even if I just re-run same command again?</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">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><span class=""><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<span class="m_179408789538515162Apple-converted-space">&nbsp;</span><a href="http://swift.org/" target="_blank" class="">swift.org</a><span class="m_179408789538515162Apple-converted-space">&nbsp;</span>blog post on refactoring.</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">There are no bad questions or too many questions. Welcome to the dev-list = ).</div><span class=""><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 class=""><br class=""></div></span><div class="">Answer my questions above... I'll help you get across the finish line.</div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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>______________________________<wbr class="">_________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" target="_blank" class="">https://lists.swift.org/mailma<wbr class="">n/listinfo/swift-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div></div></div><span id="m_179408789538515162cid:6252723F-6BD1-42D3-8B44-B8BC968568C1@apple.com" class="">&lt;build.log.zip&gt;</span></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>