summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-10 17:02:38 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-11 10:21:28 +0200
commit140e8c993b9d5d4490c1f657affced2d48abf4af (patch)
treee93cdc3d5715e998296c7918464055b3b99996f8 /src/buildtool/execution_api/remote/bazel/bazel_api.cpp
parent42fdba2e30e020e4f3709b17cb828cd3ca015873 (diff)
downloadjustbuild-140e8c993b9d5d4490c1f657affced2d48abf4af.tar.gz
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.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_api.cpp7
1 files changed, 2 insertions, 5 deletions
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<BazelNetworkReader>{
- network_->CreateReader(), std::move(request_remote_tree)};
+ auto reader =
+ TreeReader<BazelNetworkReader>{network_->CreateReader()};
auto const result = reader.RecursivelyReadTreeLeafs(
info.digest, output_paths[i]);
if (not result or