EasyCrypt / easycrypt

EasyCrypt: Computer-Aided Cryptographic Proofs
MIT License
306 stars 46 forks source link

GIT hash not up-to-date #549

Closed MQuaresma closed 2 months ago

MQuaresma commented 3 months ago

The 'GIT hash' information shown when starting an EC shell is not up-to-date i.e. doesn't match the actual version/release that was compiled.

The following is a screenshot of the output when compiling release 2024.01: Screenshot 2024-05-23 at 16 13 19

fdupress commented 3 months ago

This is because dune subst uses a set of flags for git describe that ignores lightweight tags. Using annotated tags to tag releases would ensure that the description stops at latest release.

We can probably do this retrospectively for already-released releases. It might break someone's flow, but it breaks it in the direction of making it simpler, so we can probably take the heat on this.

fdupress commented 3 months ago

That being said, @MQuaresma, the git hash displayed does contain enough information for you to figure out what to check out, in this case, the commit whose hash starts with 2b3bbad.

Generally, you can feed a string produced by git describe into git rev-parse and get the full commit hash.

fdupress commented 3 months ago

@strub do you want to try and address this retrospectively by annotating existing tags, or take it on board for future releases?

strub commented 2 months ago

We should annotate the tags that relate the releases. I'll give it a try.

strub commented 2 months ago

The tags are now annotated:

>> Copyright (c) 2012 IMDEA Software Institute
>> Copyright (c) 2012 Inria
>> Copyright (c) 2017 Ecole Polytechnique
>> Copyright (c) EasyCrypt contributors (see AUTHORS)
>> Distributed under the terms of the MIT license
>> Standard Library (theories/**/*.ec): 
>>  Distributed under the terms of the MIT license
>> 
>> GIT hash: r2024.01-48-gddcc091-dirty
[0|check]>