diff options
author | eldritch horrors <pennae@lix.systems> | 2024-10-20 22:55:00 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-10-23 11:55:12 +0000 |
commit | b8cc54df0a7748e1af5b2f0acbf548c5bcab6f56 (patch) | |
tree | 69d3aaa50f44383cc6449c8a82f3325d6b66679e /src/libstore/build/substitution-goal.cc | |
parent | 67f1aafd610c028b160f2f2ac805e671ed7073de (diff) |
libstore: return relevant store path in goal result
we now do not need the goal pointers any more to process worker results.
Change-Id: I1a021b862ca666bcd23fee9f38973e90e6f94a72
Diffstat (limited to 'src/libstore/build/substitution-goal.cc')
-rw-r--r-- | src/libstore/build/substitution-goal.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index e0ca23a86..2d0c594ac 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -3,6 +3,7 @@ #include "nar-info.hh" #include "signals.hh" #include "finally.hh" +#include <boost/outcome/try.hpp> #include <kj/array.h> #include <kj/vector.h> @@ -54,7 +55,7 @@ try { /* If the path already exists we're done. */ if (!repair && worker.store.isValidPath(storePath)) { - return {done(ecSuccess, BuildResult::AlreadyValid)}; + co_return done(ecSuccess, BuildResult::AlreadyValid); } if (settings.readOnlyMode) @@ -62,9 +63,11 @@ try { subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list<ref<Store>>(); - return tryNext(); + BOOST_OUTCOME_CO_TRY(auto result, co_await tryNext()); + result.storePath = storePath; + co_return result; } catch (...) { - return {std::current_exception()}; + co_return result::failure(std::current_exception()); } |