aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/drv-output-substitution-goal.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-10-05 00:38:35 +0200
committereldritch horrors <pennae@lix.systems>2024-10-05 20:53:39 +0000
commit1caf2afb1d1fffe0ff54244d335c168f4c32cbdf (patch)
tree03ac6bc364f748c99b47953abd712b35209a9841 /src/libstore/build/drv-output-substitution-goal.cc
parent7ff60b7445ccb599edcbf0078d181034f61a0859 (diff)
libstore: move Goal::buildResult to WorkResult
derivation goals still hold a BuildResult member variable since parts of these results of accumulated in different places, but the Goal class now no longer has such a field. substitution goals don't need it at all, and derivation goals should also be refactored to not drop their buildResult Change-Id: Ic6d3d471cdbe790a6e09a43445e25bedec6ed446
Diffstat (limited to 'src/libstore/build/drv-output-substitution-goal.cc')
-rw-r--r--src/libstore/build/drv-output-substitution-goal.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc
index adfed5845..f04beb884 100644
--- a/src/libstore/build/drv-output-substitution-goal.cc
+++ b/src/libstore/build/drv-output-substitution-goal.cc
@@ -30,7 +30,7 @@ try {
/* If the derivation already exists, we’re done */
if (worker.store.queryRealisation(id)) {
- co_return WorkResult{ecSuccess, std::move(buildResult)};
+ co_return WorkResult{ecSuccess};
}
subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list<ref<Store>>();
@@ -61,7 +61,7 @@ try {
/* Hack: don't indicate failure if there were no substituters.
In that case the calling derivation should just do a
build. */
- co_return WorkResult{substituterFailed ? ecFailed : ecNoSubstituters, std::move(buildResult)};
+ co_return WorkResult{substituterFailed ? ecFailed : ecNoSubstituters};
}
sub = subs.front();
@@ -142,7 +142,6 @@ try {
debug("The output path of the derivation output '%s' could not be substituted", id.to_string());
return {WorkResult{
nrNoSubstituters > 0 || nrIncompleteClosure > 0 ? ecIncompleteClosure : ecFailed,
- std::move(buildResult),
}};
}
@@ -155,7 +154,7 @@ try {
kj::Promise<Result<Goal::WorkResult>> DrvOutputSubstitutionGoal::finished() noexcept
try {
trace("finished");
- return {WorkResult{ecSuccess, std::move(buildResult)}};
+ return {WorkResult{ecSuccess}};
} catch (...) {
return {std::current_exception()};
}