Skip to content

Commit ececce5

Browse files
L-asEricson2314
authored andcommitted
Remove cleanup from goal
1 parent 7e5138a commit ececce5

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

src/libstore/build/goal.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ Goal::Done Goal::amDone(ExitCode result, std::optional<Error> ex)
193193
waiters.clear();
194194
worker.removeGoal(shared_from_this());
195195

196-
cleanup();
197-
198196
// We drop the continuation.
199197
// In `final_awaiter` this will signal that there is no more work to be done.
200198
top_co->handle.promise().continuation = {};

src/libstore/build/goal.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,6 @@ protected:
364364
Done amDone(ExitCode result, std::optional<Error> ex = {});
365365

366366
public:
367-
virtual void cleanup() { }
368-
369367
/**
370368
* Project a `BuildResult` with just the information that pertains
371369
* to the given request.

src/libstore/build/substitution-goal.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Goal::Done PathSubstitutionGoal::done(
3535
debug(*errorMsg);
3636
buildResult.errorMsg = *errorMsg;
3737
}
38+
cleanup();
3839
return amDone(result);
3940
}
4041

src/libstore/build/substitution-goal.hh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ public:
6969
Co tryToRun(StorePath subPath, nix::ref<Store> sub, std::shared_ptr<const ValidPathInfo> info, bool & substituterFailed);
7070
Co finished();
7171

72-
/* Called by destructor, can't be overridden */
73-
void cleanup() override final;
72+
void cleanup();
7473

7574
JobCategory jobCategory() const override {
7675
return JobCategory::Substitution;

0 commit comments

Comments
 (0)