diff options
author | regnat <rg@regnat.ovh> | 2020-12-09 16:56:56 +0100 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-12-11 21:17:23 +0100 |
commit | bab1cda0e6c30e25460b5a9c809589d3948f35df (patch) | |
tree | 4418501c6be637b4049d34c0a132db2a9a8ddeaf /src/libexpr/primops.cc | |
parent | 8914e01e37ad072d940e2000fede7c2e0f4b194c (diff) |
Use the hash modulo in the derivation outputs
Rather than storing the derivation outputs as `drvPath!outputName` internally,
store them as `drvHashModulo!outputName` (or `outputHash!outputName` for
fixed-output derivations).
This makes the storage slightly more opaque, but enables an earlier
cutoff in cases where a fixed-output dependency changes (but keeps the
same output hash) − same as what we already do for input-addressed
derivations.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 41f06c219..d059e3daf 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1107,7 +1107,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * // Shouldn't happen as the toplevel derivation is not CA. assert(false); }, - [&](UnknownHashes) { + [&](DeferredHash _) { for (auto & i : outputs) { drv.outputs.insert_or_assign(i, DerivationOutput { |