From 15f3c80f2a22b136e11f0118f4886a8668469c1f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 24 Apr 2025 16:13:47 +0200 Subject: profile: fix path rebasing During execution, paths are relative to the working directory of the action; however, in our representation, all paths are always relative to the action root. Commit d65d711f844224dcf9215c52be8f69fd2885adfc tried to change the reporing to our usual standard, however got the direction wrong; fix this. --- src/buildtool/profile/TARGETS | 1 - src/buildtool/profile/profile.cpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/buildtool/profile/TARGETS b/src/buildtool/profile/TARGETS index 7906c2b4..318ed075 100644 --- a/src/buildtool/profile/TARGETS +++ b/src/buildtool/profile/TARGETS @@ -13,7 +13,6 @@ , ["src/buildtool/common", "cli"] , ["src/buildtool/common", "common"] , ["src/utils/cpp", "expected"] - , ["src/utils/cpp", "path_rebase"] ] , "stage": ["src", "buildtool", "profile"] } diff --git a/src/buildtool/profile/profile.cpp b/src/buildtool/profile/profile.cpp index bc0560cf..6e7e8d47 100644 --- a/src/buildtool/profile/profile.cpp +++ b/src/buildtool/profile/profile.cpp @@ -14,13 +14,13 @@ #include "src/buildtool/profile/profile.hpp" +#include #include #include "gsl/gsl" #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/cli.hpp" #include "src/utils/cpp/expected.hpp" -#include "src/utils/cpp/path_rebase.hpp" void Profile::Write(int exit_code) { if (not actions_.empty()) { @@ -140,9 +140,10 @@ void Profile::NoteActionCompleted(std::string const& id, } } else { + std::filesystem::path base{cwd}; for (auto const& [k, v] : **artifacts) { actions_[id].artifacts.emplace( - RebasePathStringRelativeTo(cwd, k), v.digest.hash()); + (base / k).lexically_normal().string(), v.digest.hash()); } } } -- cgit v1.2.3