summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor/executor.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-01-22 16:51:07 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-07 12:39:05 +0100
commit21fadd2e516497b02c641594ffd648a0e7f91f71 (patch)
tree2cd09eb1ff7613287f9e8fb873a2d7db95507224 /src/buildtool/execution_engine/executor/executor.hpp
parentde9ef55bc195bd0255af9457bb938f574c270f5d (diff)
downloadjustbuild-21fadd2e516497b02c641594ffd648a0e7f91f71.tar.gz
DAG: Drop usage of TransformedRange.
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp
index db204fe6..0ec7dfe6 100644
--- a/src/buildtool/execution_engine/executor/executor.hpp
+++ b/src/buildtool/execution_engine/executor/executor.hpp
@@ -69,7 +69,6 @@
#include "src/utils/cpp/hex_string.hpp"
#include "src/utils/cpp/path_rebase.hpp"
#include "src/utils/cpp/prefix.hpp"
-#include "src/utils/cpp/transformed_range.hpp"
/// \brief Implementations for executing actions and uploading artifacts.
class ExecutorImpl {
@@ -149,10 +148,10 @@ class ExecutorImpl {
}
auto base = action->Content().Cwd();
- auto cwd_relative_output_files = RebasePathStringsRelativeTo(
- base, action->OutputFilePaths().ToVector());
- auto cwd_relative_output_dirs = RebasePathStringsRelativeTo(
- base, action->OutputDirPaths().ToVector());
+ auto cwd_relative_output_files =
+ RebasePathStringsRelativeTo(base, action->OutputFilePaths());
+ auto cwd_relative_output_dirs =
+ RebasePathStringsRelativeTo(base, action->OutputDirPaths());
auto remote_action = (alternative_api ? *alternative_api : api)
.CreateAction(*root_digest,
action->Command(),
@@ -554,7 +553,7 @@ class ExecutorImpl {
/// are present in the artifacts map
[[nodiscard]] static auto CheckOutputsExist(
IExecutionResponse::ArtifactInfos const& artifacts,
- DependencyGraph::ActionNode::LocalPaths const& outputs,
+ std::vector<Action::LocalPath> const& outputs,
std::string base) noexcept -> bool {
return std::all_of(
outputs.begin(),
@@ -617,13 +616,14 @@ class ExecutorImpl {
return false;
}
+ auto const output_files = action->OutputFilePaths();
+ auto const output_dirs = action->OutputDirPaths();
+
if (artifacts.value()->empty() or
- not CheckOutputsExist(*artifacts.value(),
- action->OutputFilePaths(),
- action->Content().Cwd()) or
- not CheckOutputsExist(*artifacts.value(),
- action->OutputDirPaths(),
- action->Content().Cwd())) {
+ not CheckOutputsExist(
+ *artifacts.value(), output_files, action->Content().Cwd()) or
+ not CheckOutputsExist(
+ *artifacts.value(), output_dirs, action->Content().Cwd())) {
logger.Emit(LogLevel::Error, [&]() {
std::ostringstream message{};
if (action_failed) {
@@ -632,10 +632,10 @@ class ExecutorImpl {
}
message << "action executed with missing outputs.\nAction "
"outputs should be the following artifacts:";
- for (auto const& output : action->OutputFilePaths()) {
+ for (auto const& output : output_files) {
message << "\n - file: " << output;
}
- for (auto const& output : action->OutputDirPaths()) {
+ for (auto const& output : output_dirs) {
message << "\n - dir: " << output;
}
return message.str();