From fc6291e46dda940a69b627a3287b4633bb89f29f Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 5 Oct 2024 00:38:35 +0200 Subject: libstore: return goal results from Worker::run() this will be needed to move all interesting result fields out of Goal proper and into WorkResult. once that is done we can treat goals as a totally internal construct of the worker mechanism, which also allows us to fully stop exposing unclear intermediate state to Worker users. Change-Id: I98d7778a4b5b2590b7b070bdfc164a22a0ef7190 --- src/libstore/build/worker.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libstore/build/worker.hh') diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index fa1031907..6569de6ee 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -86,6 +86,7 @@ class Worker : public WorkerBase { public: using Targets = std::map>>; + using Results = std::map; private: @@ -154,7 +155,7 @@ private: /** * Pass current stats counters to the logger for progress bar updates. */ - kj::Promise> updateStatistics(); + kj::Promise> updateStatistics(); AsyncSemaphore statisticsUpdateSignal{1}; std::optional statisticsUpdateInhibitor; @@ -167,8 +168,8 @@ private: statisticsUpdateInhibitor = {}; } - kj::Promise> runImpl(Targets topGoals); - kj::Promise> boopGC(LocalStore & localStore); + kj::Promise> runImpl(Targets topGoals); + kj::Promise> boopGC(LocalStore & localStore); public: @@ -265,7 +266,7 @@ public: /** * Loop until the specified top-level goals have finished. */ - std::vector run(std::function req); + Results run(std::function req); /*** * The exit status in case of failure. -- cgit v1.2.3