1
1
Fork 0
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:
regnat 2021-06-03 15:27:03 +02:00
parent 8787218c7c
commit b39ab10749

View file

@ -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;
}