mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 16:59:35 +01:00
use the setEvalCache function at the flake root
Probably doesn’t change much, but much cleaner (and robust)
This commit is contained in:
parent
b39ab10749
commit
9053ac0693
1 changed files with 5 additions and 4 deletions
|
|
@ -620,11 +620,12 @@ void callFlake(EvalState & state,
|
|||
state.callFunction(**vCallFlake, *vLocks, *vTmp1, noPos);
|
||||
state.callFunction(*vTmp1, *vRootSrc, *vTmp2, noPos);
|
||||
state.callFunction(*vTmp2, *vRootSubdir, vRes, noPos);
|
||||
state.forceAttrs(vRes); // FIXME: Make more robust and lazy
|
||||
state.forceValue(vRes);
|
||||
auto fingerprint = lockedFlake.getFingerprint();
|
||||
auto evalCache = state.openTreeCache(fingerprint);
|
||||
auto cacheRoot = evalCache ? evalCache->getRoot() : nullptr;
|
||||
vRes.attrs->eval_cache = ValueCache(cacheRoot);
|
||||
auto treeCache = state.openTreeCache(fingerprint);
|
||||
auto cacheRoot = treeCache ? treeCache->getRoot() : nullptr;
|
||||
auto evalCache = ValueCache(cacheRoot);
|
||||
vRes.setEvalCache(evalCache);
|
||||
}
|
||||
|
||||
static void prim_getFlake(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue