1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 03:01:47 +02:00

Crudely make worker only provide a Store, not LocalStore

We downcast in a few places, this will be refactored to be better later.
This commit is contained in:
John Ericson 2020-12-20 17:36:52 +00:00
parent 12f7a1f65b
commit 450c3500f1
3 changed files with 54 additions and 27 deletions

View file

@ -8,7 +8,7 @@
namespace nix {
Worker::Worker(LocalStore & store)
Worker::Worker(Store & store)
: act(*logger, actRealise)
, actDerivations(*logger, actBuilds)
, actSubstitutions(*logger, actCopyPaths)
@ -229,7 +229,9 @@ void Worker::run(const Goals & _topGoals)
checkInterrupt();
store.autoGC(false);
// TODO GC interface?
if (auto localStore = dynamic_cast<LocalStore *>(&store))
localStore->autoGC(false);
/* Call every wake goal (in the ordering established by
CompareGoalPtrs). */