diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-14 15:16:10 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-19 17:50:30 +0100 |
commit | 8ab573ef1c624e2ed81b2032178c25451176d2f1 (patch) | |
tree | b3e41ee30eed3240bcd18502b7972903e7c2a53e /src/buildtool/graph_traverser/graph_traverser.hpp | |
parent | dfa481bd5f97d92c444dc31a4a051cb890494d1d (diff) | |
download | justbuild-8ab573ef1c624e2ed81b2032178c25451176d2f1.tar.gz |
ApiBundle: Remove HashFunction.
And ensure every user obtains HashFunction from corresponding IExecutionApi
Diffstat (limited to 'src/buildtool/graph_traverser/graph_traverser.hpp')
-rw-r--r-- | src/buildtool/graph_traverser/graph_traverser.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/graph_traverser/graph_traverser.hpp b/src/buildtool/graph_traverser/graph_traverser.hpp index 1f6759a8..d385473c 100644 --- a/src/buildtool/graph_traverser/graph_traverser.hpp +++ b/src/buildtool/graph_traverser/graph_traverser.hpp @@ -214,7 +214,7 @@ class GraphTraverser { auto const [blobs, tree_descs, actions] = *desc; HashFunction::Type const hash_type = - context_.apis->hash_function.GetType(); + context_.apis->local->GetHashType(); std::vector<ActionDescription::Ptr> action_descriptions{}; action_descriptions.reserve(actions.size()); for (auto const& [id, description] : actions.items()) { @@ -312,9 +312,10 @@ class GraphTraverser { [[nodiscard]] auto UploadBlobs( std::vector<std::string> const& blobs) const noexcept -> bool { std::unordered_set<ArtifactBlob> container; + HashFunction const hash_function{context_.apis->remote->GetHashType()}; for (auto const& blob : blobs) { auto digest = ArtifactDigestFactory::HashDataAs<ObjectType::File>( - context_.apis->hash_function, blob); + hash_function, blob); Logger::Log(logger_, LogLevel::Trace, [&]() { return fmt::format( "Will upload blob {}, its digest has id {} and size {}.", |