roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.46k stars 313 forks source link

building from source should set `roc version` #7030

Closed Anton-4 closed 1 month ago

Anton-4 commented 2 months ago

If you build Roc from source and execute roc version you'll get the default value "built-from-source". It would be nice to print some useful info:

For those without git changes we can print the last commit hash and date of the commit:

built from commit faeea52, with commit timestamp Fri Aug 23 09:02:06 UTC 2024

And with changes:

built from commit faeea52 with additional changes. Commit timestamp: Fri Aug 23 09:02:06 UTC 2024

Hasnep commented 2 months ago

I think I'd like to tackle this issue if nobody else has already started :)

lukewilliamboswell commented 1 month ago

@Anton-4 @Hasnep just wanted to check if this Issue is fully resolved. It looks good to me, but not sure about the intent behind the with additional changes part of the description.

Hasnep commented 1 month ago

Yes, this can be closed, the "with additional changes" message is for when the git head being built from is dirty, i.e. there are uncommitted changes.