<div dir="ltr"><div>Hi all,</div><div><br><font face="monospace, monospace">getSwiftFullVersion</font> output must take account stdlib revsion?<br></div><div><br></div>How about get the revision hash from the Swift repository<div>*excluding* stdlib/, test/ and validation-test/ directories.</div><div><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">git log -1 --pretty=format:%H -- \</font></div><div><div><font face="monospace, monospace"> . \</font></div><div><font face="monospace, monospace"> :(exclude)stdlib \</font></div><div><font face="monospace, monospace"> :(exclude)test \</font></div><div><font face="monospace, monospace"> :(exclude)validation-test</font></div></div></blockquote><div><br></div><div>Instead of,</div><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">git log -1 --pretty=format:%H</font></blockquote><div><br></div><div>Or more specifically, just include only "compiler" related directories:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">git log -1 --pretty=format:%H -- include/ lib/ tools/</font></blockquote><div><br></div><div>
<p class="">I've wrote PoC code</p></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-12 2:22 GMT+09:00 Jordan Rose via swift-dev <span dir="ltr"><<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>></span>:<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"><span class=""><br><div><blockquote type="cite"><div>On Apr 7, 2016, at 14:01, Chris Lattner <<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>> wrote:</div><br><div><div><br><blockquote type="cite">On Apr 6, 2016, at 11:08 AM, Jordan Rose via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:<br><br>I imagine it's because your git hash has changed, which is used in the --version output for swiftc. I'm not sure how to avoid that cost entirely, but we could add a CMake option to not do it (which you could set locally), and we could probably move it to a library that isn't used by most of those tools (so that we're only re-linking swiftc).<br></blockquote><br>Could we move the hash to be a text file stored next to the executables in the installdir? That way the text file gets updated, but not the binaries?</div></div></blockquote><br></div></span><div>Oh, that's clever. Maybe that's good enough for local builds. I'd want to be careful about it for the binary we ship (to not waste an fstat).</div><div><br></div><div>FWIW this isn't <i>quite</i> just --version output; we also stamp it into swiftmodule files. But any build with an actual submission tag will use that instead.</div><div><br></div><div>Jordan</div><br></div><br>_______________________________________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br>
<br></blockquote></div><br></div>