aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/entry-points.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:12:13 +0000
commitfc6291e46dda940a69b627a3287b4633bb89f29f (patch)
tree0b1900880da86c30f19b0356379557c393a2ecc2 /src/libstore/build/entry-points.cc
parent40f154c0edc53e160b70fc60b2b5b8652dfbe84b (diff)
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
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r--src/libstore/build/entry-points.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc
index 27c341295..73b0f01f3 100644
--- a/src/libstore/build/entry-points.cc
+++ b/src/libstore/build/entry-points.cc
@@ -25,7 +25,7 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod
StringSet failed;
std::shared_ptr<Error> ex;
- for (auto & i : goals) {
+ for (auto & [i, result] : goals) {
if (i->ex) {
if (ex)
logError(i->ex->info());
@@ -89,7 +89,7 @@ BuildResult Store::buildDerivation(const StorePath & drvPath, const BasicDerivat
goals.emplace(gf.makeBasicDerivationGoal(drvPath, drv, OutputsSpec::All{}, buildMode));
return goals;
});
- auto goal = *goals.begin();
+ auto [goal, result] = *goals.begin();
return goal->buildResult.restrictTo(DerivedPath::Built {
.drvPath = makeConstantStorePathRef(drvPath),
.outputs = OutputsSpec::All {},
@@ -116,7 +116,7 @@ void Store::ensurePath(const StorePath & path)
goals.emplace(gf.makePathSubstitutionGoal(path));
return goals;
});
- auto goal = *goals.begin();
+ auto [goal, result] = *goals.begin();
if (goal->exitCode != Goal::ecSuccess) {
if (goal->ex) {
@@ -138,7 +138,7 @@ void Store::repairPath(const StorePath & path)
goals.emplace(gf.makePathSubstitutionGoal(path, Repair));
return goals;
});
- auto goal = *goals.begin();
+ auto [goal, result] = *goals.begin();
if (goal->exitCode != Goal::ecSuccess) {
/* Since substituting the path didn't work, if we have a valid