diff options
author | Théophane Hufschmitt <theophane@hufschmitt.net> | 2022-03-16 14:21:09 +0100 |
---|---|---|
committer | Théophane Hufschmitt <theophane@hufschmitt.net> | 2022-03-29 18:17:35 +0200 |
commit | 390269ed8784b1a73a3310e63eb96a4b62861654 (patch) | |
tree | 15520077ec0d9083301cd44ab4d7b5edbf4927d8 /src/nix-channel | |
parent | 2d572a250f5eef8bfe223c8e5196cce9e85d73f7 (diff) |
Simplify the handling of the hash modulo
Rather than having four different but very similar types of hashes, make
only one, with a tag indicating whether it corresponds to a regular of
deferred derivation.
This implies a slight logical change: The original Nix+multiple-outputs
model assumed only one hash-modulo per derivation. Adding
multiple-outputs CA derivations changed this as these have one
hash-modulo per output. This change is now treating each derivation as
having one hash modulo per output.
This obviously means that we internally loose the guaranty that
all the outputs of input-addressed derivations have the same hash
modulo. But it turns out that it doesn’t matter because there’s nothing
in the code taking advantage of that fact (and it probably shouldn’t
anyways).
The upside is that it is now much easier to work with these hashes, and
we can get rid of a lot of useless `std::visit{ overloaded`.
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
Diffstat (limited to 'src/nix-channel')
0 files changed, 0 insertions, 0 deletions