diff options
author | eldritch horrors <pennae@lix.systems> | 2024-09-30 01:31:30 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-10-01 11:55:47 +0000 |
commit | 775292766025380d04004e42fefbdb8ca40b3fa3 (patch) | |
tree | 24c5433640a57c804ec53b36336387122cb6fcd6 /src/libstore/build/derivation-goal.hh | |
parent | 3edc272341b22f4d088f30c407b55d91da9bff2c (diff) |
libstore: turn DerivationGoal::work into *one* promise
Change-Id: Ic2f7bc2bd6a1879ad614e4be81a7214f64eb0e85
Diffstat (limited to 'src/libstore/build/derivation-goal.hh')
-rw-r--r-- | src/libstore/build/derivation-goal.hh | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/build/derivation-goal.hh index 6e8e979d3..7505409c0 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/build/derivation-goal.hh @@ -216,9 +216,6 @@ struct DerivationGoal : public Goal */ std::optional<DerivationType> derivationType; - typedef kj::Promise<Result<WorkResult>> (DerivationGoal::*GoalState)(bool inBuildSlot) noexcept; - GoalState state; - BuildMode buildMode; NotifyingCounter<uint64_t>::Bump mcExpectedBuilds, mcRunningBuilds; @@ -257,23 +254,23 @@ struct DerivationGoal : public Goal /** * The states. */ - kj::Promise<Result<WorkResult>> getDerivation(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> loadDerivation(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> haveDerivation(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> outputsSubstitutionTried(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> gaveUpOnSubstitution(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> closureRepaired(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> inputsRealised(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> tryToBuild(bool inBuildSlot) noexcept; - virtual kj::Promise<Result<WorkResult>> tryLocalBuild(bool inBuildSlot) noexcept; - kj::Promise<Result<WorkResult>> buildDone(bool inBuildSlot) noexcept; + kj::Promise<Result<WorkResult>> getDerivation() noexcept; + kj::Promise<Result<WorkResult>> loadDerivation() noexcept; + kj::Promise<Result<WorkResult>> haveDerivation() noexcept; + kj::Promise<Result<WorkResult>> outputsSubstitutionTried() noexcept; + kj::Promise<Result<WorkResult>> gaveUpOnSubstitution() noexcept; + kj::Promise<Result<WorkResult>> closureRepaired() noexcept; + kj::Promise<Result<WorkResult>> inputsRealised() noexcept; + kj::Promise<Result<WorkResult>> tryToBuild() noexcept; + virtual kj::Promise<Result<WorkResult>> tryLocalBuild() noexcept; + kj::Promise<Result<WorkResult>> buildDone() noexcept; - kj::Promise<Result<WorkResult>> resolvedFinished(bool inBuildSlot) noexcept; + kj::Promise<Result<WorkResult>> resolvedFinished() noexcept; /** * Is the build hook willing to perform the build? */ - HookReply tryBuildHook(bool inBuildSlot); + HookReply tryBuildHook(); virtual int getChildStatus(); @@ -325,8 +322,6 @@ protected: Finished tooMuchLogs(); void flushLine(); - static kj::Promise<Result<WorkResult>> continueOrError(kj::Promise<Outcome<void, Goal::Finished>> p); - public: /** * Wrappers around the corresponding Store methods that first consult the |