From cfa8c2a41e8a585834e4d04d56ff7eec0d57f608 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 30 Jan 2024 17:50:03 +0100 Subject: async maps: Create utility library to handle cycle detection --- src/other_tools/root_maps/fpath_git_map.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/other_tools/root_maps/fpath_git_map.cpp') diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 11344de1..bb6b5a83 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -18,6 +18,7 @@ #include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_repo.hpp" +#include "src/buildtool/multithreading/async_map_utils.hpp" #include "src/buildtool/multithreading/task_system.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/fs_utils.hpp" @@ -127,9 +128,10 @@ void ResolveFilePathTree( logger](auto const& hashes) { if (not hashes[0]) { // check for cycles - auto error = DetectAndReportCycle(*resolve_symlinks_map, - tree_hash); - if (error) { + if (auto error = DetectAndReportCycle( + fmt::format("resolving Git tree {}", tree_hash), + *resolve_symlinks_map, + kGitObjectToResolvePrinter)) { (*logger)(fmt::format("Failed to resolve symlinks " "in tree {}:\n{}", tree_hash, -- cgit v1.2.3