diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-06 12:18:25 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-07 13:30:06 +0200 |
commit | 51f8b186803292f111011d04d5291deb374dc34c (patch) | |
tree | 818606bb46be19cc56618f1d56eb5e3f309f4fae /src/buildtool/execution_api/remote/bazel/bazel_action.cpp | |
parent | 64b8da270611ebb997c3801f09bd06878aee026a (diff) | |
download | justbuild-51f8b186803292f111011d04d5291deb374dc34c.tar.gz |
LocalTreeMap: Prevent tree objects from being stored
... to align with the original idea of caching a flat list
of blob objects, without the need to recursively traverse
any trees. Consequently, we cannot create any map entry in
places where we do not have all sub-tree entries at hand
(e.g., LocalAPI, BazelAPI, BazelResponse).
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_action.cpp')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_action.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp index 34fc5380..c2c44280 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp @@ -6,7 +6,6 @@ BazelAction::BazelAction( std::shared_ptr<BazelNetwork> network, - std::shared_ptr<LocalTreeMap> tree_map, bazel_re::Digest root_digest, std::vector<std::string> command, std::vector<std::string> output_files, @@ -14,7 +13,6 @@ BazelAction::BazelAction( std::map<std::string, std::string> const& env_vars, std::map<std::string, std::string> const& properties) noexcept : network_{std::move(network)}, - tree_map_{std::move(tree_map)}, root_digest_{std::move(root_digest)}, cmdline_{std::move(command)}, output_files_{std::move(output_files)}, @@ -47,7 +45,7 @@ auto BazelAction::Execute(Logger const* logger) noexcept network_->GetCachedActionResult(action, output_files_)) { if (result->exit_code() == 0) { return IExecutionResponse::Ptr{new BazelResponse{ - action.hash(), network_, tree_map_, {*result, true}}}; + action.hash(), network_, {*result, true}}}; } } } @@ -59,14 +57,11 @@ auto BazelAction::Execute(Logger const* logger) noexcept auto action_id = CreateBundlesForAction(nullptr, root_digest_, false).hash(); output->cached_result = true; - return IExecutionResponse::Ptr{ - new BazelResponse{std::move(action_id), - network_, - tree_map_, - std::move(*output)}}; + return IExecutionResponse::Ptr{new BazelResponse{ + std::move(action_id), network_, std::move(*output)}}; } - return IExecutionResponse::Ptr{new BazelResponse{ - action.hash(), network_, tree_map_, std::move(*output)}}; + return IExecutionResponse::Ptr{ + new BazelResponse{action.hash(), network_, std::move(*output)}}; } } |