From c08837b3d99b85e9a0ffc476b13c52199717ab70 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 8 Apr 2025 17:22:12 +0200 Subject: executor: for a tree-overlay action, also report inputs in case of error --- src/buildtool/execution_engine/executor/executor.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') 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 const& action, IExecutionApi const& api, - gsl::not_null const& progress) -> std::optional { progress->TaskTracker().Start(action->Content().Id()); @@ -807,6 +806,19 @@ class ExecutorImpl { msg << origin.second; } } + if (action->Content().IsTreeOverlayAction()) { + msg << "\ninputs were"; + std::vector 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()); } -- cgit v1.2.3