summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/tree_reader.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-10 18:51:20 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-13 14:41:00 +0200
commitf60d39620b29aeaf1addeb244bdd6e15ddf4894c (patch)
tree2617d65884c975b3fc63dd48e58242ec36138246 /src/buildtool/execution_api/common/tree_reader.hpp
parented8f24fb246142ffaa88707ae86b53c34df82986 (diff)
downloadjustbuild-f60d39620b29aeaf1addeb244bdd6e15ddf4894c.tar.gz
Rename Compatibility class to ProtocolTraits
...and move it to the common stage.
Diffstat (limited to 'src/buildtool/execution_api/common/tree_reader.hpp')
-rw-r--r--src/buildtool/execution_api/common/tree_reader.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/common/tree_reader.hpp b/src/buildtool/execution_api/common/tree_reader.hpp
index d9048e1f..18e94fe8 100644
--- a/src/buildtool/execution_api/common/tree_reader.hpp
+++ b/src/buildtool/execution_api/common/tree_reader.hpp
@@ -23,6 +23,7 @@
#include "src/buildtool/common/artifact.hpp"
#include "src/buildtool/common/bazel_types.hpp"
+#include "src/buildtool/common/protocol_traits.hpp"
#include "src/buildtool/execution_api/common/tree_reader_utils.hpp"
#include "src/buildtool/file_system/git_repo.hpp"
#include "src/buildtool/file_system/object_type.hpp"
@@ -58,7 +59,7 @@ class TreeReader final {
return true;
};
- if (Compatibility::IsCompatible()) {
+ if (ProtocolTraits::Instance().IsCompatible()) {
auto tree = impl_.ReadDirectory(digest);
if (tree and
not TreeReaderUtils::ReadObjectInfos(*tree, store_info)) {
@@ -131,7 +132,7 @@ class TreeReader final {
: store(parent / path, info);
};
- if (Compatibility::IsCompatible()) {
+ if (ProtocolTraits::Instance().IsCompatible()) {
if (auto tree = impl_.ReadDirectory(digest)) {
if (include_trees and IsDirectoryEmpty(*tree)) {
if (not store(parent, {digest, ObjectType::Tree})) {