mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 01:09:37 +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)
|
if (cacheResult.lastQueriedSymbolIfMissing)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
case ValueCache::CacheMiss: // FIXME: Handle properly
|
case ValueCache::CacheMiss:
|
||||||
|
resultingCursor = eval_cache;
|
||||||
|
break;
|
||||||
case ValueCache::Forward: // FIXME: Handle properly
|
case ValueCache::Forward: // FIXME: Handle properly
|
||||||
case ValueCache::NoCacheKey:
|
case ValueCache::NoCacheKey:
|
||||||
case ValueCache::UnCacheable:
|
case ValueCache::UnCacheable:
|
||||||
|
|
@ -1234,6 +1236,9 @@ bool EvalState::getAttrField(Value & attrs, const std::vector<Symbol> & selector
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cacheResult.returnCode == ValueCache::Forward)
|
||||||
|
vAttrs->setEvalCache(resultingCursor);
|
||||||
|
|
||||||
dest = *vAttrs;
|
dest = *vAttrs;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue