diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2022-11-03 11:34:37 +0100 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2022-11-04 16:41:06 +0100 |
commit | e6d6c1b04434d02e01a4dca4d953674f4f110763 (patch) | |
tree | ce6102999d0f6bb5f178fa2b4e627887ab72eaf1 /src | |
parent | c592c7e83613647db2256ac5351e63d09e2d7858 (diff) | |
download | justbuild-e6d6c1b04434d02e01a4dca4d953674f4f110763.tar.gz |
Remove unwanted native protocol prefixes from user-visible locations
Diffstat (limited to 'src')
4 files changed, 19 insertions, 12 deletions
diff --git a/src/buildtool/execution_api/local/local_ac.hpp b/src/buildtool/execution_api/local/local_ac.hpp index 3b3da55a..57909028 100644 --- a/src/buildtool/execution_api/local/local_ac.hpp +++ b/src/buildtool/execution_api/local/local_ac.hpp @@ -60,8 +60,8 @@ class LocalAC { } if (not digest.ParseFromString(*entry)) { logger_.Emit(LogLevel::Warning, - "Parsing cache entry failed failed for action {}", - action_id.hash()); + "Parsing cache entry failed for action {}", + NativeSupport::Unprefix(action_id.hash())); return std::nullopt; } auto src_path = cas_->BlobPath(digest); @@ -74,7 +74,7 @@ class LocalAC { } logger_.Emit(LogLevel::Warning, "Parsing action result failed for action {}", - action_id.hash()); + NativeSupport::Unprefix(action_id.hash())); return std::nullopt; } diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp index f5bec696..19842f9c 100644 --- a/src/buildtool/execution_api/local/local_action.cpp +++ b/src/buildtool/execution_api/local/local_action.cpp @@ -59,7 +59,7 @@ auto LocalAction::Execute(Logger const* logger) noexcept "start execution\n" " - exec_dir digest: {}\n" " - action digest: {}", - static_cast<bazel_re::Digest>(root_digest_).hash(), + root_digest_.hash(), action.hash()); } @@ -93,8 +93,9 @@ auto LocalAction::Execute(Logger const* logger) noexcept auto LocalAction::Run(bazel_re::Digest const& action_id) const noexcept -> std::optional<Output> { - auto exec_path = CreateUniquePath(LocalExecutionConfig::CacheRoot() / - "exec_root" / action_id.hash()); + auto exec_path = + CreateUniquePath(LocalExecutionConfig::CacheRoot() / "exec_root" / + NativeSupport::Unprefix(action_id.hash())); if (not exec_path) { return std::nullopt; diff --git a/src/buildtool/execution_api/local/local_storage.cpp b/src/buildtool/execution_api/local/local_storage.cpp index 304ea502..a52e347d 100644 --- a/src/buildtool/execution_api/local/local_storage.cpp +++ b/src/buildtool/execution_api/local/local_storage.cpp @@ -26,8 +26,9 @@ namespace { *content); } } - Logger::Log( - LogLevel::Error, "Directory {} not found in CAS", digest.hash()); + Logger::Log(LogLevel::Error, + "Directory {} not found in CAS", + NativeSupport::Unprefix(digest.hash())); return std::nullopt; } @@ -43,7 +44,9 @@ namespace { /*is_hex_id=*/false); } } - Logger::Log(LogLevel::Error, "Tree {} not found in CAS", digest.hash()); + Logger::Log(LogLevel::Error, + "Tree {} not found in CAS", + NativeSupport::Unprefix(digest.hash())); return std::nullopt; } diff --git a/src/buildtool/execution_api/remote/bazel/bazel_network.cpp b/src/buildtool/execution_api/remote/bazel/bazel_network.cpp index 5bf254e1..eb9078f1 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_network.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_network.cpp @@ -29,8 +29,9 @@ namespace { return BazelMsgFactory::MessageFromString<bazel_re::Directory>( blobs.at(0).data); } - Logger::Log( - LogLevel::Error, "Directory {} not found in CAS", digest.hash()); + Logger::Log(LogLevel::Error, + "Directory {} not found in CAS", + NativeSupport::Unprefix(digest.hash())); return std::nullopt; } @@ -46,7 +47,9 @@ namespace { HashFunction::ComputeTreeHash(content).Bytes(), /*is_hex_id=*/false); } - Logger::Log(LogLevel::Error, "Tree {} not found in CAS", digest.hash()); + Logger::Log(LogLevel::Error, + "Tree {} not found in CAS", + NativeSupport::Unprefix(digest.hash())); return std::nullopt; } |