diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-05-27 11:42:59 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-05-28 16:19:19 +0200 |
commit | 9bdd30f307b83a3901250a51780f308f5c4a0065 (patch) | |
tree | 56b26bd1624dbdd7768791e99745331f02f8f2f1 /src/buildtool/execution_api/common/blob_tree.hpp | |
parent | 95df0b6d1bb7d65bdf02533cb7067067000776d3 (diff) | |
download | justbuild-9bdd30f307b83a3901250a51780f308f5c4a0065.tar.gz |
Use ArtifactBlob in BlobTree instead of BazelBlob.
Diffstat (limited to 'src/buildtool/execution_api/common/blob_tree.hpp')
-rw-r--r-- | src/buildtool/execution_api/common/blob_tree.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
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<std::shared_ptr<BlobTree>>; @@ -33,12 +33,13 @@ using BlobTreePtr = gsl::not_null<std::shared_ptr<BlobTree>>; /// upload. class BlobTree { public: - BlobTree(BazelBlob blob, std::vector<BlobTreePtr> nodes) + BlobTree(ArtifactBlob blob, std::vector<BlobTreePtr> 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<bazel_re::Digest>(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<BlobTreePtr> nodes_; }; |