From 51f8b186803292f111011d04d5291deb374dc34c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Thu, 6 Oct 2022 12:18:25 +0200 Subject: 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). --- src/buildtool/execution_api/remote/bazel/bazel_action.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_action.cpp') 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 network, - std::shared_ptr tree_map, bazel_re::Digest root_digest, std::vector command, std::vector output_files, @@ -14,7 +13,6 @@ BazelAction::BazelAction( std::map const& env_vars, std::map 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)}}; } } -- cgit v1.2.3