mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 23:51:00 +01:00
Log BuildResult
This commit is contained in:
parent
c515bc66f1
commit
762114b7c4
5 changed files with 75 additions and 21 deletions
|
|
@ -1563,6 +1563,13 @@ Goal::Done DerivationGoal::done(
|
|||
fs << worker.store.printStorePath(drvPath) << "\t" << buildResult.toString() << std::endl;
|
||||
}
|
||||
|
||||
logger->result(
|
||||
act ? act->id : getCurActivity(),
|
||||
resBuildResult,
|
||||
KeyedBuildResult(
|
||||
buildResult,
|
||||
DerivedPath::Built{.drvPath = makeConstantStorePathRef(drvPath), .outputs = wantedOutputs}).toJSON(worker.store));
|
||||
|
||||
return amDone(buildResult.success() ? ecSuccess : ecFailed, std::move(ex));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,11 @@
|
|||
#include "nar-info.hh"
|
||||
#include "finally.hh"
|
||||
#include "signals.hh"
|
||||
|
||||
#include <coroutine>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace nix {
|
||||
|
||||
PathSubstitutionGoal::PathSubstitutionGoal(const StorePath & storePath, Worker & worker, RepairFlag repair, std::optional<ContentAddress> ca)
|
||||
|
|
@ -35,6 +38,14 @@ Goal::Done PathSubstitutionGoal::done(
|
|||
debug(*errorMsg);
|
||||
buildResult.errorMsg = *errorMsg;
|
||||
}
|
||||
|
||||
logger->result(
|
||||
getCurActivity(),
|
||||
resBuildResult,
|
||||
KeyedBuildResult(
|
||||
buildResult,
|
||||
DerivedPath::Opaque{storePath}).toJSON(worker.store));
|
||||
|
||||
return amDone(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue