From 7eafe5779703275d455558120efc754c2dcc3c01 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 2 Sep 2024 10:50:48 +0200 Subject: Replace ArtifactDigest::Create ...with ArtifactDigestFactory::HashDataAs --- src/buildtool/execution_engine/executor/TARGETS | 1 + src/buildtool/execution_engine/executor/executor.hpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_engine/executor') diff --git a/src/buildtool/execution_engine/executor/TARGETS b/src/buildtool/execution_engine/executor/TARGETS index 85e48a00..fb407a8d 100644 --- a/src/buildtool/execution_engine/executor/TARGETS +++ b/src/buildtool/execution_engine/executor/TARGETS @@ -7,6 +7,7 @@ , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] , ["src/buildtool/common", "common"] + , ["src/buildtool/common", "artifact_digest_factory"] , ["src/buildtool/common", "tree"] , ["src/buildtool/compatibility", "compatibility"] , ["src/buildtool/file_system", "file_system_manager"] diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index ad2fefea..0cf54eec 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -29,6 +29,7 @@ #include "gsl/gsl" #include "src/buildtool/common/artifact_digest.hpp" +#include "src/buildtool/common/artifact_digest_factory.hpp" #include "src/buildtool/common/statistics.hpp" #include "src/buildtool/common/tree.hpp" #include "src/buildtool/compatibility/compatibility.hpp" @@ -465,8 +466,8 @@ class ExecutorImpl { if (not content.has_value()) { return std::nullopt; } - auto digest = - ArtifactDigest::Create(hash_function, *content); + auto digest = ArtifactDigestFactory::HashDataAs( + hash_function, *content); if (not api.Upload(ArtifactBlobContainer{ {ArtifactBlob{digest, std::move(*content), -- cgit v1.2.3