From 140e8c993b9d5d4490c1f657affced2d48abf4af Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 10 Apr 2025 17:02:38 +0200 Subject: Drop unused directory map The BazelNetworkReader contains an optimization for reading directories in case the remote execution (in compatible mode) supports the GetTree request. This is, however not the case for many remote exeuciton services, including our own single-node execution service. So the code is basically untested and rarely used, if at all. Moreover, justbuild is usually used in native mode and using compatibility mode is expected to handle tree operations less efficient. Therefore, remove this basically dead code and decrease complexity this way. --- src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index fe6ad757..f15d421d 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -191,11 +191,8 @@ auto BazelApi::CreateAction( else { if (IsTreeObject(info.type)) { // read object infos from sub tree and call retrieve recursively - auto request_remote_tree = alternative != nullptr - ? std::make_optional(info.digest) - : std::nullopt; - auto reader = TreeReader{ - network_->CreateReader(), std::move(request_remote_tree)}; + auto reader = + TreeReader{network_->CreateReader()}; auto const result = reader.RecursivelyReadTreeLeafs( info.digest, output_paths[i]); if (not result or -- cgit v1.2.3