[Nix-dev] Gratuitous generations
Serge Kosyrev
_deepfire at feelingofgreen.ru
Mon Mar 30 23:30:43 CEST 2015
Christian Theune <ct at flyingcircus.io> writes:
>> We could add an option to suppress creating a new generation if nothing has changed.
>
> Sounds like an idea to start working on this. If your main concern is to avoid
> accidentally breaking the switch/rollback semantics while providing this then
> maybe at some point the option could be dropped.
>
> Mulling over this: I’m not sure what the clear expectation is on the
> switch/rollback scenario when nothing is changing. Knowing that rolback always
> gets me to the point prior to the last switch (independently whether something was
> changed or not) is a simple rule (which is good). I can also see that rollback
> fixes the last change. This would require users to understand when a rebuild
> introduced a change or not. This would require an additional concept to be
> present, the overhead of that is currently unclear to me.
Just a somewhat silly idea..
What if we had a more pervasive content-addressing (CAS) --
i.e. generations were named by a hash of its contents -- hashes of the
constituent derivatations and relevant meta information?
In the case nothing truly changed, we'd get the same hash.
Mapping the hashes to a monotonic progression of numbers could then be
added atop.
--
regards,
Серёга Косырев
More information about the nix-dev
mailing list