diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-26 15:38:02 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-29 12:35:54 +0200 |
commit | 83d0b47f96001aea5b171ca4d19deb303146413a (patch) | |
tree | 8b5486018bb89f778323567ebf4830e7a1c5f90b /src | |
parent | ca2c263b7286a8ec31c88bfa6d9227ecee7c6574 (diff) | |
download | justbuild-83d0b47f96001aea5b171ca4d19deb303146413a.tar.gz |
bazel_execution_client: Replace protobuf map use with STL
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp | 4 | ||||
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp index 56f0b137..7ae20693 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp @@ -237,7 +237,9 @@ auto BazelExecutionClient::ExtractContents( output.action_result = exec_response.result(); output.cached_result = exec_response.cached_result(); output.message = exec_response.message(); - output.server_logs = exec_response.server_logs(); + for (const auto& [k, v] : exec_response.server_logs()) { + output.server_logs[k].CopyFrom(v); + } response.output = output; response.state = ExecutionResponse::State::Finished; diff --git a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp index c258d833..f2f25b71 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp @@ -18,6 +18,7 @@ #include <memory> #include <optional> #include <string> +#include <unordered_map> #include "build/bazel/remote/execution/v2/remote_execution.grpc.pb.h" #include "google/longrunning/operations.pb.h" @@ -35,8 +36,7 @@ class BazelExecutionClient { bazel_re::ActionResult action_result{}; bool cached_result{}; grpc::Status status{}; - // TODO(vmoreno): switch to non-google type for the map - google::protobuf::Map<std::string, bazel_re::LogFile> server_logs{}; + std::unordered_map<std::string, bazel_re::Digest> server_logs{}; std::string message{}; }; |