aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/drv-output-substitution-goal.hh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-26 19:24:38 +0200
committereldritch horrors <pennae@lix.systems>2024-08-02 13:52:15 +0000
commitdfcab1c3f09971cba6a198ba81158d1190975165 (patch)
tree36f4287da46b9fae2d864fb6c6d8c30a5240d46a /src/libstore/build/drv-output-substitution-goal.hh
parent724b345eb985404065a930304b82112a80ee92d3 (diff)
libstore: return finishedness from Goal methods
this is the first step towards removing all result-related mutation of Goal state from goal implementations themselves, and into Worker state instead. once that is done we can treat all non-const Goal fields like private state of the goal itself, and make threading of goals possible Change-Id: I69ff7d02a6fd91a65887c6640bfc4f5fb785b45c
Diffstat (limited to 'src/libstore/build/drv-output-substitution-goal.hh')
-rw-r--r--src/libstore/build/drv-output-substitution-goal.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstore/build/drv-output-substitution-goal.hh b/src/libstore/build/drv-output-substitution-goal.hh
index 598b119dc..a28347f15 100644
--- a/src/libstore/build/drv-output-substitution-goal.hh
+++ b/src/libstore/build/drv-output-substitution-goal.hh
@@ -58,20 +58,20 @@ class DrvOutputSubstitutionGoal : public Goal {
public:
DrvOutputSubstitutionGoal(const DrvOutput& id, Worker & worker, RepairFlag repair = NoRepair, std::optional<ContentAddress> ca = std::nullopt);
- typedef void (DrvOutputSubstitutionGoal::*GoalState)();
+ typedef WorkResult (DrvOutputSubstitutionGoal::*GoalState)();
GoalState state;
- void init();
- void tryNext();
- void realisationFetched();
- void outPathValid();
- void finished();
+ WorkResult init();
+ WorkResult tryNext();
+ WorkResult realisationFetched();
+ WorkResult outPathValid();
+ WorkResult finished();
- void timedOut(Error && ex) override { abort(); };
+ Finished timedOut(Error && ex) override { abort(); };
std::string key() override;
- void work() override;
+ WorkResult work() override;
JobCategory jobCategory() const override {
return JobCategory::Substitution;