Hm. But this one was pretty much a clean build. I’ve made sure I removed all build directories before running it. <br><br>Is there a flag to pass to build-toolchain to ensure clean build? Would —clean work?<br><div class="gmail_quote"><div dir="ltr">On Wed, 20 Sep 2017 at 9:48 am, Michael Gottesman <<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Can you do a new clean build and post the log?</div><div style="word-wrap:break-word"><div><br><div><blockquote type="cite"><div>On Sep 19, 2017, at 4:11 PM, Maksym Grebenets <<a href="mailto:mgrebenets@gmail.com" target="_blank">mgrebenets@gmail.com</a>> wrote:</div><br class="m_1877218380583379056Apple-interchange-newline"><div><div dir="ltr">Sure, I've put it in a gist here: <a href="https://gist.github.com/mgrebenets/9f50bc07615002cfe6ebb3a9f74cb3de" target="_blank">https://gist.github.com/mgrebenets/9f50bc07615002cfe6ebb3a9f74cb3de</a><div><br></div><div>Cheers.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 20, 2017 at 5:46 AM, Michael Gottesman <span dir="ltr"><<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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><br><div><blockquote type="cite"><div><div class="m_1877218380583379056h5"><div>On Sep 19, 2017, at 12:35 AM, Maksym Grebenets <<a href="mailto:mgrebenets@gmail.com" target="_blank">mgrebenets@gmail.com</a>> wrote:</div><br class="m_1877218380583379056m_179408789538515162Apple-interchange-newline"></div></div><div><div><div class="m_1877218380583379056h5"><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">Hi Michael<div><br></div><div>Thanks for the feedback!</div><div><br></div><div>I gave it another go and this time made sure I have a proper setup.</div><div><br></div><div><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b>./swift/utils/update-checkout --clone<br>./swift/utils/update-checkout --tag swift-DEVELOPMENT-SNAPSHOT-2017-09-18-a</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">I've double checked all the submodules directories to make sure the tag was properly checked out.</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Next I've configured Xcode with this command:</p><div><br class="m_1877218380583379056m_179408789538515162webkit-block-placeholder"></div><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b>sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">The<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>xcodebuild -version<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span></b>output is:<br></p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b>Xcode 9.0<br>Build version 9M214v</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">And the Host OS is<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>10.12.6</b>, which matches requirements on CI: <a href="https://ci.swift.org/" target="_blank">https://ci.swift.org/</a>.</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">With all that configured I finally kick off the build:</p><div><br class="m_1877218380583379056m_179408789538515162webkit-block-placeholder"></div><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b>./swift/utils/build-toolchain swift.local | tee build.log</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">After about 2+ hours it ends up with same 3 failures:</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b>Failing Tests (3):</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b> Swift(iphonesimulator-i386) :: stdlib/Character.swift<br> Swift(iphonesimulator-i386) :: stdlib/CodableTests.swift<br> Swift(iphonesimulator-i386) :: stdlib/MapKit.swift</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><b> Expected Passes : 9957<br> Expected Failures : 27<br> Unsupported Tests : 446<br> Unexpected Failures: 3</b></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Here's log for one of the failing tests:</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><br></p></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><br></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">********************</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Testing: 0</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">FAIL: Swift(iphonesimulator-i386) :: stdlib/MapKit.swift (566 of 10433)</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">******************** TEST 'Swift(iphonesimulator-i386) :: stdlib/MapKit.swift' FAILED ********************</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Script:</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">rm -rf /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/test-iphonesimulator-i386/stdlib/Output/MapKit.swift.tmp && mkdir -p /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/test-iphonesimulator-i386/stdlib/Output/MapKit.swift.tmp && xcrun --toolchain default --sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/bin/swiftc -target i386-apple-ios7.0 -module-cache-path '/var/folders/vs/50_hfsmx4m1cpwbn7j3x6r6c0000gp/T/swift-testsuite-clang-module-cachefYcCzs' -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/../../../Developer/Library/Frameworks -swift-version 3 -module-cache-path '/var/folders/vs/50_hfsmx4m1cpwbn7j3x6r6c0000gp/T/swift-testsuite-clang-module-cachefYcCzs' /Users/grebenma/Projects/oss/swift/swift/test/stdlib/MapKit.swift -o /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/test-iphonesimulator-i386/stdlib/Output/MapKit.swift.tmp/a.out -module-name main && xcrun --toolchain default --sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk simctl spawn 'iPhone 5' /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/test-iphonesimulator-i386/stdlib/Output/MapKit.swift.tmp/a.out</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Exit Code: 134</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><br></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Command Output (stdout):</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">[ RUN ] MapKit.NSValue bridging</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">stdout>>> check failed at /Users/grebenma/Projects/oss/swift/swift/stdlib/private/StdlibUnittestFoundationExtras/StdlibUnittestFoundationExtras.swift, line 130</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">stdout>>> expected: <00000000 00003140 00000000 00004340> (of type NSConcreteValue)</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">stdout>>> actual: <00000000 00003140 00000000 00004340> (of type NSConcreteValue)</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">[ FAIL ] MapKit.NSValue bridging</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">MapKit: Some tests failed, aborting</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">UXPASS: []</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">FAIL: ["NSValue bridging"]</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">SKIP: []</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">To debug, run:</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">$ /Users/grebenma/Projects/oss/swift/build/buildbot_osx/swift-macosx-x86_64/test-iphonesimulator-i386/stdlib/Output/MapKit.swift.tmp/a.out --stdlib-unittest-in-process --stdlib-unittest-filter "NSValue bridging"</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><br></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Command Output (stderr):</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p><p class="m_1877218380583379056m_179408789538515162gmail-p1">Child process terminated with signal 6: Abort trap</p><p class="m_1877218380583379056m_179408789538515162gmail-p1"><br></p><p class="m_1877218380583379056m_179408789538515162gmail-p1">--</p></div></blockquote><div>The logs don't make much sense to me, especially since<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>actual</b><span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span>and<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>expected</b><span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span>values look the same :shrugs:.</div><div><br></div>I'm not sure if mailing lists accept attachment, but I attached full build log just in case.<div><br></div><div>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><br></div><div>So far this is where I got stuck with building toolchain.<br>There wasn't much issues with running stuff like</div><div><b>swift/utils/build-script --release-debuginfo --debug-swift </b></div><div>and then running incremental builds, e.g. </div><div><b>ninja -C build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-macosx-x86_64 swift-refactor</b></div><div><br></div><div>But when it comes to building the toolchain, this is what I arrived at. </div><div><br></div><div>Thanks again for your help!</div><div><br></div><div>Max<br><div><br></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><div class="gmail_quote">On Tue, Sep 19, 2017 at 4:58 AM, Michael Gottesman<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>></span><span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span>wrote:<br><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"><br><div><span><blockquote type="cite"><div>On Sep 18, 2017, at 8:54 AM, Maksym Grebenets via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:</div><br class="m_1877218380583379056m_179408789538515162m_7860436664409470296Apple-interchange-newline"><div><div dir="ltr">Hi all<div><br></div><div>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><br></div><div>So new refactoring tools and starter tasks finally pulled me in.</div><div><br></div><div>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><br></div><div>That's where I was thrown back to the "what do I do?" state again...</div><div><br></div><div>I pulled latest<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>master</b><span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span>branch and ran<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><b>build-toolchain<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </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><br></div></span><div>What were the failing tests?</div><span><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>So I thought:</div><div><br></div><div>cd swift</div><div>git checkout swift-DEVELOPMENT-SNAPSHOT-2017-09-15-a<br></div><div>cd ..</div><div>./swift/utils/update-checkout --tag swift-DEVELOPMENT-SNAPSHOT-2017-09-15-a</div><div><br></div><div>then build and fail again :(...</div></div></div></blockquote><div><br></div></span><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><span><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>OK then, so I just disable the tests and give it another go:</div><div><br></div><div># build-presets.ini</div><div><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"><div><span style="color:rgb(96,139,78)">#test</span></div><div><span style="color:rgb(96,139,78)">#validation-test</span></div><div><span style="color:rgb(96,139,78)">#long-test</span></div></div></div><div><br></div><div>Yay! I got a toolchain!</div><div>I copy it over to /Library/Developer/Toolchains/ </div><div>Select it in Xcode (latest Xcode 9 GM) and... no luck</div><div>The source code highlighting disappears, </div><div>I get "An internal error occurred. Source editor functionality is limited..." error.</div><div>All of the refactoring actions are disabled.</div><div><br></div><div>I guess those 3 failing tests did matter in the end...</div><div><br></div><div><br></div><div>I may be frustrated, because I don't understand what's going on, but I don't feel like giving up.</div><div><br></div><div>I'd appreciate any help or advice I can get!</div><div><br></div><div>Should I choose an older tag from before to get all tests passing?</div></div></div></blockquote><div><br></div></span><div>Do you mean before the last known good snapshot? If a snapshot was published on<span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span><a href="http://swift.org/" target="_blank">swift.org</a>, it /should/ pass all of the tests.</div><span><br><blockquote type="cite"><div><div dir="ltr"><div>Should I build using Xcode beta rather then GM?<br></div></div></div></blockquote><div><br></div></span><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/" target="_blank">https://ci.swift.org</a> with a nice link.</div><span><br><blockquote type="cite"><div><div dir="ltr"><div>Is there any way to build/re-build the OS X toolchain any faster? </div><div>Why does it take so long even if I just re-run same command again?</div></div></div></blockquote><div><br></div></span><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><span><br><blockquote type="cite"><div><div dir="ltr"><div>Where did I get it wrong so the toolchain doesn't really work with Xcode?</div><div>Can I connect lldb to process that runs my lit tests?</div><div><br></div><div>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_1877218380583379056m_179408789538515162Apple-converted-space"> </span><a href="http://swift.org/" target="_blank">swift.org</a><span class="m_1877218380583379056m_179408789538515162Apple-converted-space"> </span>blog post on refactoring.</div></div></div></blockquote><div><br></div></span><div>There are no bad questions or too many questions. Welcome to the dev-list = ).</div><span><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>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></div></span><div>Answer my questions above... I'll help you get across the finish line.</div><div><br></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></div><div>Michael</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Thank you!</div></div>_______________________________________________<br>swift-dev mailing list<br><a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-dev" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div></div><span id="m_1877218380583379056m_179408789538515162cid:6252723F-6BD1-42D3-8B44-B8BC968568C1@apple.com"><build.log.zip></span></div></blockquote></div><br></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></blockquote></div>