Overhaul derivation hash modulo somewhat#6229
Conversation
1575119 to
2217537
Compare
This changes was taken from dynamic derivation (NixOS#4628). It` somewhat undoes the refactors I first did for floating CA derivations, as the benefit of hindsight + requirements of dynamic derivations made me reconsider some things. They aren't to consequential, but I figured they might be good to land first, before the more profound changes @thufschmitt has in the works.
2217537 to
0948b8e
Compare
|
@thufschmitt I did rebase your PR on top of Ericson2314@thufschmitt-hash-modulo (and take a few things I liked from it :)), but I didn't add it to this PR because yours changes behavior: the resolution of input drvs no longer "flattens" the outputs of fixed output and and floating output derivations: This original version makes each CA output hash its own fake (hash) "drv", with a single "out" output. This mimicks the resolution of CA derivations. Conversely all the input-addressed outputs are kept together. This puts all the output names ( I think the moral of the story is we might need tests with hard-coded derivations, so we can catch when we actually change this stuff by mistake! |
Oh thanks, good catch. Actually I think this is plain wrong because it means that only the last output will be taken into account (since it’s a map and they all share the same key).
Yes, we do. There’s already a handful of these (one in the testsuite and a hydra job testing that evaluation of the whole of nixpkgs is unchanged), but afaik none of them uses CA derivations (although in the case at hand it should probably have been caught with any test involving multiple-outputs derivations since we’re effectively erasing some dependencies in that case) |
|
@thufschmitt Sounds good. Are you OK merging this part then? |
|
Thanks! |
These changes were taken from dynamic derivation (#4628). They somewhat
undo the the refactors I first did for floating CA derivations, as the
benefit of hindsight + requirements of dynamic derivations made me
reconsider some things.
They aren't to consequential, but I figured they might be good to land
first, before the more profound changes @thufschmitt has in the works.