diff options
Diffstat (limited to 'src/buildtool/serve_api/remote')
-rw-r--r-- | src/buildtool/serve_api/remote/TARGETS | 1 | ||||
-rw-r--r-- | src/buildtool/serve_api/remote/target_client.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/buildtool/serve_api/remote/TARGETS b/src/buildtool/serve_api/remote/TARGETS index c211d26f..acbe40e1 100644 --- a/src/buildtool/serve_api/remote/TARGETS +++ b/src/buildtool/serve_api/remote/TARGETS @@ -76,6 +76,7 @@ , ["src/buildtool/common", "artifact_digest_factory"] , ["@", "fmt", "", "fmt"] , ["@", "json", "", "json"] + , ["src/buildtool/crypto", "hash_function"] ] } , "configuration_client": diff --git a/src/buildtool/serve_api/remote/target_client.cpp b/src/buildtool/serve_api/remote/target_client.cpp index 32d7377f..f339172f 100644 --- a/src/buildtool/serve_api/remote/target_client.cpp +++ b/src/buildtool/serve_api/remote/target_client.cpp @@ -24,6 +24,7 @@ #include "src/buildtool/common/artifact_digest_factory.hpp" #include "src/buildtool/common/bazel_types.hpp" #include "src/buildtool/common/remote/client_common.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/logging/log_level.hpp" namespace { @@ -173,7 +174,8 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, obj_info.ToString())}; } try { - auto const& result = TargetCacheEntry::FromJson( + auto const result = TargetCacheEntry::FromJson( + storage_.GetHashFunction().GetType(), nlohmann::json::parse(*target_value_str)); // return the target cache value information return serve_target_result_t{std::in_place_index<3>, |