1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-05 08:31:00 +01:00

Revert "Merge pull request #14097 from obsidiansystems/light-realisation-improvements"

This reverts commit dc8c1461da, reversing
changes made to 28adcfda32.
This commit is contained in:
Sergei Zimmerman 2025-10-05 21:54:32 +03:00
parent 7ba3ef21a6
commit 7e39ab4dc7
No known key found for this signature in database
32 changed files with 254 additions and 423 deletions

View file

@ -77,7 +77,7 @@ void LocalOverlayStore::registerDrvOutput(const Realisation & info)
// First do queryRealisation on lower layer to populate DB
auto res = lowerStore->queryRealisation(info.id);
if (res)
LocalStore::registerDrvOutput({*res, info.id});
LocalStore::registerDrvOutput(*res);
LocalStore::registerDrvOutput(info);
}
@ -108,12 +108,12 @@ void LocalOverlayStore::queryPathInfoUncached(
}
void LocalOverlayStore::queryRealisationUncached(
const DrvOutput & drvOutput, Callback<std::shared_ptr<const UnkeyedRealisation>> callback) noexcept
const DrvOutput & drvOutput, Callback<std::shared_ptr<const Realisation>> callback) noexcept
{
auto callbackPtr = std::make_shared<decltype(callback)>(std::move(callback));
LocalStore::queryRealisationUncached(
drvOutput, {[this, drvOutput, callbackPtr](std::future<std::shared_ptr<const UnkeyedRealisation>> fut) {
drvOutput, {[this, drvOutput, callbackPtr](std::future<std::shared_ptr<const Realisation>> fut) {
try {
auto info = fut.get();
if (info)
@ -123,7 +123,7 @@ void LocalOverlayStore::queryRealisationUncached(
}
// If we don't have it, check lower store
lowerStore->queryRealisation(
drvOutput, {[callbackPtr](std::future<std::shared_ptr<const UnkeyedRealisation>> fut) {
drvOutput, {[callbackPtr](std::future<std::shared_ptr<const Realisation>> fut) {
try {
(*callbackPtr)(fut.get());
} catch (...) {