From 7ef44660181b5c9743475ea73bc2e87a5f1d318f Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 5 Oct 2024 00:38:35 +0200 Subject: libstore: have goals promise WorkResults, not void Change-Id: Idd218ec1572eda84dc47accc0dcd8a954d36f098 --- src/libstore/build/worker.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libstore/build/worker.cc') diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index e90f17678..839b56bc8 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -53,7 +53,7 @@ Worker::~Worker() template G> -std::pair, kj::Promise> Worker::makeGoalCommon( +std::pair, kj::Promise>> Worker::makeGoalCommon( std::map> & map, const ID & key, InvocableR> auto create, @@ -89,7 +89,7 @@ std::pair, kj::Promise> Worker::makeGoalCommon( } -std::pair, kj::Promise> Worker::makeDerivationGoal( +std::pair, kj::Promise>> Worker::makeDerivationGoal( const StorePath & drvPath, const OutputsSpec & wantedOutputs, BuildMode buildMode ) { @@ -110,7 +110,7 @@ std::pair, kj::Promise> Worker::makeDeriva } -std::pair, kj::Promise> Worker::makeBasicDerivationGoal( +std::pair, kj::Promise>> Worker::makeBasicDerivationGoal( const StorePath & drvPath, const BasicDerivation & drv, const OutputsSpec & wantedOutputs, @@ -134,7 +134,7 @@ std::pair, kj::Promise> Worker::makeBasicD } -std::pair, kj::Promise> +std::pair, kj::Promise>> Worker::makePathSubstitutionGoal( const StorePath & path, RepairFlag repair, std::optional ca ) @@ -148,7 +148,7 @@ Worker::makePathSubstitutionGoal( } -std::pair, kj::Promise> +std::pair, kj::Promise>> Worker::makeDrvOutputSubstitutionGoal( const DrvOutput & id, RepairFlag repair, std::optional ca ) @@ -162,16 +162,16 @@ Worker::makeDrvOutputSubstitutionGoal( } -std::pair> Worker::makeGoal(const DerivedPath & req, BuildMode buildMode) +std::pair>> Worker::makeGoal(const DerivedPath & req, BuildMode buildMode) { return std::visit(overloaded { - [&](const DerivedPath::Built & bfd) -> std::pair> { + [&](const DerivedPath::Built & bfd) -> std::pair>> { if (auto bop = std::get_if(&*bfd.drvPath)) return makeDerivationGoal(bop->path, bfd.outputs, buildMode); else throw UnimplementedError("Building dynamic derivations in one shot is not yet implemented."); }, - [&](const DerivedPath::Opaque & bo) -> std::pair> { + [&](const DerivedPath::Opaque & bo) -> std::pair>> { return makePathSubstitutionGoal(bo.path, buildMode == bmRepair ? Repair : NoRepair); }, }, req.raw()); -- cgit v1.2.3