diff options
Diffstat (limited to 'src')
3 files changed, 6 insertions, 4 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index d274655a..7d3d004d 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -111,7 +111,7 @@ class ExecutorImpl { action->Content().IsOverlayDisjoint()); if (not computed_overlay) { logger.Emit(LogLevel::Error, - "Tree-overlay computation failed: {}", + "Tree-overlay computation failed:\n{}", computed_overlay.error()); return nullptr; } diff --git a/src/buildtool/execution_engine/tree_operations/TARGETS b/src/buildtool/execution_engine/tree_operations/TARGETS index e440b9c9..3a7e4183 100644 --- a/src/buildtool/execution_engine/tree_operations/TARGETS +++ b/src/buildtool/execution_engine/tree_operations/TARGETS @@ -11,6 +11,7 @@ , "private-deps": [ ["@", "fmt", "", "fmt"] , ["@", "gsl", "", "gsl"] + , ["@", "json", "", "json"] , ["@", "protoc", "", "libprotobuf"] , ["src/buildtool/common", "artifact_blob"] , ["src/buildtool/common", "bazel_types"] diff --git a/src/buildtool/execution_engine/tree_operations/tree_operations_utils.cpp b/src/buildtool/execution_engine/tree_operations/tree_operations_utils.cpp index f6f78e0c..3943d5f4 100644 --- a/src/buildtool/execution_engine/tree_operations/tree_operations_utils.cpp +++ b/src/buildtool/execution_engine/tree_operations/tree_operations_utils.cpp @@ -25,6 +25,7 @@ #include "fmt/core.h" #include "google/protobuf/repeated_ptr_field.h" #include "gsl/gsl" +#include "nlohmann/json.hpp" #include "src/buildtool/common/artifact_blob.hpp" #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/artifact_digest_factory.hpp" @@ -322,11 +323,11 @@ auto TreeOperationsUtils::ComputeTreeOverlay( // If both objects are not trees, actual conflict detected. if (disjoint) { return unexpected{ - fmt::format("Conflict detected in tree overlay computation {} " - "vs {}: '{}' points to different objects: {} vs {}", + fmt::format("Conflict detected in tree-overlay computation {} " + "vs {}:\n{} points to different objects: {} vs {}", base_tree_info.ToString(), other_tree_info.ToString(), - base_name, + nlohmann::json(base_name).dump(), base_entry.info.ToString(), it->second.info.ToString())}; } |