From 8fb642b6e09368d10d8357fcb7c508f706fa5f08 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Tue, 24 Sep 2024 00:21:16 +0200 Subject: libstore: remove Goal::WaitForWorld have DerivationGoal and its subclasses produce a wrapper promise for their intermediate results instead, and return this wrapper promise. Worker already handles promises that do not complete immediately, so we do not have to duplicate this into an entire result type variant. Change-Id: Iae8dbf63cfc742afda4d415922a29ac5a3f39348 --- src/libstore/build/worker.cc | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/libstore/build/worker.cc') diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 18cdde63a..1b1bf1d5c 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -202,17 +202,6 @@ void Worker::handleWorkResult(GoalPtr goal, Goal::WorkResult how) overloaded{ [&](Goal::StillAlive) {}, [&](Goal::ContinueImmediately) { wakeUp(goal); }, - [&](Goal::WaitForWorld & w) { - childStarted(goal, w.promise.then([](auto r) -> Result { - if (r.has_value()) { - return {Goal::ContinueImmediately{}}; - } else if (r.has_error()) { - return {std::move(r).error()}; - } else { - return r.exception(); - } - })); - }, [&](Goal::Finished & f) { goalFinished(goal, f); }, }, how -- cgit v1.2.3