<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Apr 3, 2018 at 10:40 AM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr">Hi,<br>No problem with me, you can merge, ask Fabio.<br></div></blockquote><div><br></div><div>I've merged the PR. Thanks :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-03 10:27 GMT+02:00 Alistair Grant <span dir="ltr"><<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-6274155590431862384HOEnZb"><div class="m_-6274155590431862384h5"><br>
On 3 April 2018 at 01:02, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
> Hi Alistair, Hi Ben,<br>
><br>
><br>
>> On Apr 2, 2018, at 9:28 AM, Alistair Grant <<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> Hi Ben,<br>
>><br>
>><br>
>>> On 2 April 2018 at 15:42, Ben Coman <<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>>> On 2 April 2018 at 20:26, Alistair Grant <<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>> wrote:<br>
>>>><br>
>>>><br>
>>>>> On Sun, Apr 01, 2018 at 10:46:14AM -0700, Eliot Miranda wrote:<br>
>>>>> Hi Alistair,<br>
>>>>><br>
>>>>> _,,,^..^,,,_ (phone)<br>
>>>>><br>
>>>>>> On Mar 31, 2018, at 1:42 PM, Alistair Grant <<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>> wrote:<br>
>>>>>><br>
>>>>>> git doesn't provide a substitution mechanism like sccs, but the script<br>
>>>>>> we have that embeds the date can just as easily embed the hash.  In<br>
>>>>>> .git_filters/RevDateURL.smudge there's a line that retrieves the<br>
>>>>>> commit date from git:<br>
>>>>>><br>
>>>>>> $date = `git log --format=%ad -1`;<br>
>>>>>><br>
>>>>>> to get the (short) hash we can simply add:<br>
>>>>>><br>
>>>>>> $shorthash = `git log --format=%h -1`;<br>
>>>>>><br>
>>>>>> The string substitution can then proceed as for the date.<br>
>>>>>><br>
>>>>>> I think it would be worthwhile having both the date and hash in the<br>
>>>>>> --version info.<br>
>>>>>><br>
>>>>>> I'm happy to add this in and update the --version output if there's<br>
>>>>>> general agreement.<br>
>>>>><br>
>>>>> Yes please!!! The conventional alternative is to invoke git log from<br>
>>>>> the makefiles and lass in the commit hash as a compiler-line default<br>
>>>>> me.  But this is messy and slows down compilation (unless there is a<br>
>>>>> special rule for just one file, and that's fragile).  I much prefer<br>
>>>>> having the commit somewhere in source.<br>
>>>><br>
>>>> Done:<br>
>>>><br>
>>>> $ git log --oneline | head<br>
>>>> 5a5b1c7 vm version string: add commit short hash<br>
>>>> 4c4686e Skip SUnit testing in Sista builds<br>
>>>> 79c0809 Merge pull request #230 from smalltalking/Cog<br>
>>>> 804ed5c Fixed typo in the download URL<br>
>>>><br>
>>>><br>
>>>> $ products/cogspur64linuxht/pharo --version<br>
>>>> 5.0-201804012008-version_hash  Sun Apr  1 22:15:07 CEST 2018 gcc 5.4.0 [Production Spur 64-bit VM]<br>
>>>> CoInterpreter VMMaker.oscog-eem.2361 uuid: 7ca2f89a-de70-422f-b92b-54f91ac4e47b Apr  1 2018<br>
>>>> StackToRegisterMappingCogit VMMaker.oscog-eem.2361 uuid: 7ca2f89a-de70-422f-b92b-54f91ac4e47b Apr  1 2018<br>
>>>> VM: 201804012008-version_hash alistair@4c0a4b2bdb79:vmmaker/opensmalltalk-vm $<br>
>>>> Date: Sun Apr 1 22:08:11 2018 +0200 $ Hash: 5a5b1c7 $<br>
>>><br>
>>><br>
>>> Maybe rather than just "Hash:" could it be more explicit as "GitHash:" or even "GitSHA1:"<br>
>>> One day the algorithm is likely to change... "Moving Git past SHA-1" (<a href="https://lwn.net/Articles/715716/" rel="noreferrer" target="_blank">https://lwn.net/Articles/715716/</a>)<br>
>>> and it may be useful later to be able to distinguish.<br>
>><br>
>> I like "GitHash" as it may not be obvious what the hash refers to for<br>
>> a newcomer.  Even if/when git moves away from sha1, from a cli/ui<br>
>> perspective presumably it will still just be "the hash".<br>
><br>
> Commit Hash?<br>
> Commit Hash (git)?<br>
> C Commit Hash?<br>
> Repository Commit Hash?<br>
><br>
> We've already moved from one sccs to another for the C code and may move again if anyone improves on git, which is not inconceivable.<br>
<br>
<br>
</div></div>Makes sense, CommitHash it is.  I've updated the PR.<br>
<br>
But since Nicolas and Fabio are busy working on getting the build and<br>
deploy pipe-line working I'll wait a bit before merging rather than<br>
potentially derailing their work (thanks, guys!).<br>
<br>
Cheers,<br>
Alistair<br>
<div class="m_-6274155590431862384HOEnZb"><div class="m_-6274155590431862384h5"><br>
<br>
<br>
<br>
>>>> Plugins: 201804012008-version_hash alistair@4c0a4b2bdb79:vmmaker/opensmalltalk-vm $<br>
>>>> Linux 4c0a4b2bdb79 4.13.0-37-generic #42~16.04.1-Ubuntu SMP Wed Mar 7 16:03:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux<br>
>>>> plugin path: products/cogspur64linuxht/lib/pharo/5.0-201804012008-version_hash [default: /home/alistair/vmmaker/opensmalltalk-vm/products/cogspur64linuxht/lib/pharo/5.0-201804012008-version_hash/]<br>
>>>><br>
>>>><br>
>>>> As expected, the hash is also included in:<br>
>>>><br>
>>>> - the VirtualMachine object (in Pharo, and the equivalent in squeak)<br>
>>><br>
>>><br>
>>> I presume this is what shows up under System > System Reporter ?<br>
>><br>
>> Yes.<br>
>><br>
>><br>
>>>> - crash.dmp<br>
>>>> - kill -USR1 output<br>
>>>><br>
>>>><br>
>>>> <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/233" rel="noreferrer" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/233</a><br>
>>>> if anyone wants to take a look.<br>
>>><br>
>>><br>
>>><br>
>>> An interesting insight for me into how the version info is generated. thx.<br>
>><br>
>> Glad it was useful. :-)<br>
>><br>
>> Thanks for your feedback.  I'll update the PR (probably tomorrow).<br>
>><br>
>> Cheers,<br>
>> Alistair<br>
</div></div></blockquote></div><br></div>
</blockquote></div></div>