[Nix-dev] RFC: NixOS version string format

Eelco Dolstra eelco.dolstra at logicblox.com
Thu May 1 15:26:32 CEST 2014


Hi,

On 01/05/14 15:15, Bjørn Forsman wrote:

> 
> I think the reason I want this is the same reason we have version
> numbers in the first place; because it's easier for humans (me!) to
> use/remember. Knowing that it's 18 commits after 14.04 is easier to
> relate to than that it's 42698 commits since the very beginning. Also,
> the current scheme looks a lot like MAJOR.MINOR.PATCH, but it doesn't
> act like it: PATCH is never reset to zero, unlike other projects I've
> seen. So it feels a bit odd to me. (Personal opinion, I agree!)

I agree that having the number of commits since the start of the branch is
nicer. I've just made a change that does this. The only problem is that it
causes the version number in the 14.04 branch to jump backwards this once, but
since we're not using it for anything automated, it shouldn't be a big problem.

> Made up example from an alternative (near future?) nixos world:
> 
> $ nixos-version
> 14.04-18-gabcd1234
> $ cd nixpkgs
> $ git describe
> 14.04-20-gdefg5678   # Ah, my checkout is two commits ahead!

That's assuming you're on the 14.04 branch. If you're on master, and 14.04 is
the nearest tag, it will say something similar, but it will be misleading
because they're not the same commits.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list