summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/source_tree.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-30 17:50:03 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-02-16 17:22:22 +0100
commitcfa8c2a41e8a585834e4d04d56ff7eec0d57f608 (patch)
treecb13964c7b39af02baedc1a52c4d1a21f56a63d9 /src/buildtool/serve_api/serve_service/source_tree.cpp
parentaa16dd1b3a50aa402003bc80fa0145d1a845c2cb (diff)
downloadjustbuild-cfa8c2a41e8a585834e4d04d56ff7eec0d57f608.tar.gz
async maps: Create utility library to handle cycle detection
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp')
-rw-r--r--src/buildtool/serve_api/serve_service/source_tree.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp
index 609775ab..5d4f0a5f 100644
--- a/src/buildtool/serve_api/serve_service/source_tree.cpp
+++ b/src/buildtool/serve_api/serve_service/source_tree.cpp
@@ -25,6 +25,7 @@
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_repo.hpp"
+#include "src/buildtool/multithreading/async_map_utils.hpp"
#include "src/buildtool/serve_api/remote/config.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/fs_utils.hpp"
@@ -387,8 +388,10 @@ auto SourceTreeService::ResolveContentTree(
return ::grpc::Status::OK;
}
// check for cycles
- auto error = DetectAndReportCycle(resolve_symlinks_map_, tree_id);
- if (error) {
+ if (auto error = DetectAndReportCycle(
+ fmt::format("resolving Git tree {}", tree_id),
+ resolve_symlinks_map_,
+ kGitObjectToResolvePrinter)) {
auto str = fmt::format(
"Failed to resolve symlinks in tree {}:\n{}", tree_id, *error);
logger_->Emit(LogLevel::Error, str);