From 9bdd30f307b83a3901250a51780f308f5c4a0065 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 27 May 2024 11:42:59 +0200 Subject: Use ArtifactBlob in BlobTree instead of BazelBlob. --- src/buildtool/execution_api/common/blob_tree.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/buildtool/execution_api/common/blob_tree.hpp') diff --git a/src/buildtool/execution_api/common/blob_tree.hpp b/src/buildtool/execution_api/common/blob_tree.hpp index 59e58410..ad462aab 100644 --- a/src/buildtool/execution_api/common/blob_tree.hpp +++ b/src/buildtool/execution_api/common/blob_tree.hpp @@ -23,8 +23,8 @@ #include "gsl/gsl" #include "src/buildtool/compatibility/native_support.hpp" -#include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp" #include "src/buildtool/execution_api/bazel_msg/directory_tree.hpp" +#include "src/buildtool/execution_api/common/artifact_blob_container.hpp" class BlobTree; using BlobTreePtr = gsl::not_null>; @@ -33,12 +33,13 @@ using BlobTreePtr = gsl::not_null>; /// upload. class BlobTree { public: - BlobTree(BazelBlob blob, std::vector nodes) + BlobTree(ArtifactBlob blob, std::vector nodes) : blob_{std::move(blob)}, nodes_{std::move(nodes)} {} - [[nodiscard]] auto Blob() const noexcept -> BazelBlob { return blob_; } + [[nodiscard]] auto Blob() const noexcept -> ArtifactBlob { return blob_; } [[nodiscard]] auto IsTree() const noexcept -> bool { - return NativeSupport::IsTree(blob_.digest.hash()); + return NativeSupport::IsTree( + static_cast(blob_.digest).hash()); } /// \brief Create a `BlobTree` from a `DirectoryTree`. @@ -52,7 +53,7 @@ class BlobTree { [[nodiscard]] auto size() const noexcept { return nodes_.size(); } private: - BazelBlob blob_; + ArtifactBlob blob_; std::vector nodes_; }; -- cgit v1.2.3