mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 16:59:35 +01:00
Properly fill the cache in case of a miss/forward
This commit is contained in:
parent
8787218c7c
commit
b39ab10749
1 changed files with 6 additions and 1 deletions
|
|
@ -1199,7 +1199,9 @@ bool EvalState::getAttrField(Value & attrs, const std::vector<Symbol> & selector
|
|||
if (cacheResult.lastQueriedSymbolIfMissing)
|
||||
return false;
|
||||
return true;
|
||||
case ValueCache::CacheMiss: // FIXME: Handle properly
|
||||
case ValueCache::CacheMiss:
|
||||
resultingCursor = eval_cache;
|
||||
break;
|
||||
case ValueCache::Forward: // FIXME: Handle properly
|
||||
case ValueCache::NoCacheKey:
|
||||
case ValueCache::UnCacheable:
|
||||
|
|
@ -1234,6 +1236,9 @@ bool EvalState::getAttrField(Value & attrs, const std::vector<Symbol> & selector
|
|||
throw;
|
||||
}
|
||||
|
||||
if (cacheResult.returnCode == ValueCache::Forward)
|
||||
vAttrs->setEvalCache(resultingCursor);
|
||||
|
||||
dest = *vAttrs;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue