summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/object_cas.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 17:27:13 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-22 17:01:13 +0200
commitdd23c6e397584f4bf1cf84a73d9c382a8ff81de7 (patch)
tree0f0f600a4674a03da42c07f4ea016ff3c2dc578e /src/buildtool/file_system/object_cas.hpp
parentbeb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff)
downloadjustbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'src/buildtool/file_system/object_cas.hpp')
-rw-r--r--src/buildtool/file_system/object_cas.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/file_system/object_cas.hpp b/src/buildtool/file_system/object_cas.hpp
index aa521e07..122778b5 100644
--- a/src/buildtool/file_system/object_cas.hpp
+++ b/src/buildtool/file_system/object_cas.hpp
@@ -22,6 +22,7 @@
#include "src/buildtool/common/artifact_digest.hpp"
#include "src/buildtool/common/bazel_types.hpp"
+#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/file_system/file_storage.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/logging/log_level.hpp"
@@ -116,13 +117,14 @@ class ObjectCAS {
[[nodiscard]] static auto CreateDigest(std::string const& bytes) noexcept
-> std::optional<bazel_re::Digest> {
- return ArtifactDigest::Create<kType>(bytes);
+ return ArtifactDigest::Create<kType>(HashFunction::Instance(), bytes);
}
[[nodiscard]] static auto CreateDigest(
std::filesystem::path const& file_path) noexcept
-> std::optional<bazel_re::Digest> {
- return ArtifactDigest::CreateFromFile<kType>(file_path);
+ return ArtifactDigest::CreateFromFile<kType>(HashFunction::Instance(),
+ file_path);
}
[[nodiscard]] auto IsAvailable(