aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-10-21 18:17:58 +0200
committereldritch horrors <pennae@lix.systems>2024-10-22 14:55:55 +0000
commit343aca3a2794922915903491a0be6f01c9dc6ced (patch)
tree42d20bc482f30b35e6750578572dbec846f39979 /src/libstore/build
parent5ce1d8463a8bfd225d1b37f2fcfe3cfb59053ec9 (diff)
libstore: clear derivation build activities when done
without this derivations do not show as completely processed in the internal-json logs (or the newer multiline output). the former also breaks external tools like nix-output-monitor which, like multiline output, grow vertically until at least some goals are finally freed Change-Id: I55758daf526ba29ae15fb82e0d88da8afb45bf5c
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/derivation-goal.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 96140e10b..5de159b2d 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -127,7 +127,11 @@ Goal::WorkResult DerivationGoal::timedOut(Error && ex)
kj::Promise<Result<Goal::WorkResult>> DerivationGoal::workImpl() noexcept
{
- return useDerivation ? getDerivation() : haveDerivation();
+ return (useDerivation ? getDerivation() : haveDerivation()).attach(kj::defer([this] {
+ act.reset();
+ actLock.reset();
+ builderActivities.clear();
+ }));
}
bool DerivationGoal::addWantedOutputs(const OutputsSpec & outputs)