diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-08 17:22:12 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-08 17:24:12 +0200 |
commit | c08837b3d99b85e9a0ffc476b13c52199717ab70 (patch) | |
tree | a3005bd3e993e19012b00b9818edda37d6b9ff15 /src/buildtool/execution_engine/executor/executor.hpp | |
parent | 8d5cdccd1b7ef53e95edab2a704a42a41d73165d (diff) | |
download | justbuild-c08837b3d99b85e9a0ffc476b13c52199717ab70.tar.gz |
executor: for a tree-overlay action, also report inputs in case of error
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index e86853fb..7015f559 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -85,7 +85,6 @@ class ExecutorImpl { Logger const& logger, gsl::not_null<DependencyGraph::ActionNode const*> const& action, IExecutionApi const& api, - gsl::not_null<Progress*> const& progress) -> std::optional<IExecutionResponse::Ptr> { progress->TaskTracker().Start(action->Content().Id()); @@ -807,6 +806,19 @@ class ExecutorImpl { msg << origin.second; } } + if (action->Content().IsTreeOverlayAction()) { + msg << "\ninputs were"; + std::vector<DependencyGraph::NamedArtifactNodePtr> inputs = + action->Dependencies(); + std::sort(inputs.begin(), inputs.end(), [](auto a, auto b) { + return a.path < b.path; + }); + for (auto const& input : inputs) { + msg << "\n - " << input.node->Content().Info()->digest.hash() + << ":" << input.node->Content().Info()->digest.size() << ":" + << ToChar(input.node->Content().Info()->type); + } + } logger.Emit(LogLevel::Error, "{}", msg.str()); } |