mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 09:36:47 +02:00
Compute fingerprint only if needed
As per Eelco's review comments Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
a60a1f09b2
commit
1c4e392c64
1 changed files with 3 additions and 4 deletions
|
@ -443,9 +443,8 @@ ref<eval_cache::EvalCache> openEvalCache(
|
|||
EvalState & state,
|
||||
std::shared_ptr<flake::LockedFlake> lockedFlake)
|
||||
{
|
||||
auto fingerprint = lockedFlake->getFingerprint(state.store);
|
||||
auto hash = evalSettings.useEvalCache && evalSettings.pureEval
|
||||
? fingerprint
|
||||
auto fingerprint = evalSettings.useEvalCache && evalSettings.pureEval
|
||||
? lockedFlake->getFingerprint(state.store)
|
||||
: std::nullopt;
|
||||
auto rootLoader = [&state, lockedFlake]()
|
||||
{
|
||||
|
@ -472,7 +471,7 @@ ref<eval_cache::EvalCache> openEvalCache(
|
|||
}
|
||||
return search->second;
|
||||
} else {
|
||||
return make_ref<nix::eval_cache::EvalCache>(hash, state, rootLoader);
|
||||
return make_ref<nix::eval_cache::EvalCache>(std::nullopt, state, rootLoader);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue