diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-06 12:18:25 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-07 13:30:06 +0200 |
commit | 51f8b186803292f111011d04d5291deb374dc34c (patch) | |
tree | 818606bb46be19cc56618f1d56eb5e3f309f4fae /src/buildtool/execution_api/local/local_storage.hpp | |
parent | 64b8da270611ebb997c3801f09bd06878aee026a (diff) | |
download | justbuild-51f8b186803292f111011d04d5291deb374dc34c.tar.gz |
LocalTreeMap: Prevent tree objects from being stored
... to align with the original idea of caching a flat list
of blob objects, without the need to recursively traverse
any trees. Consequently, we cannot create any map entry in
places where we do not have all sub-tree entries at hand
(e.g., LocalAPI, BazelAPI, BazelResponse).
Diffstat (limited to 'src/buildtool/execution_api/local/local_storage.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_storage.hpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/local/local_storage.hpp b/src/buildtool/execution_api/local/local_storage.hpp index 4ffe2881..f9594218 100644 --- a/src/buildtool/execution_api/local/local_storage.hpp +++ b/src/buildtool/execution_api/local/local_storage.hpp @@ -12,10 +12,6 @@ class LocalStorage { public: - explicit LocalStorage( - std::shared_ptr<LocalTreeMap> tree_map = nullptr) noexcept - : tree_map_{std::move(tree_map)} {} - /// \brief Store blob from file path with x-bit determined from file system. template <bool kOwner = false> [[nodiscard]] auto StoreBlob(std::filesystem::path const& file_path) @@ -89,7 +85,7 @@ class LocalStorage { LocalCAS<ObjectType::Executable> cas_exec_{}; LocalCAS<ObjectType::Tree> cas_tree_{}; LocalAC ac_{&cas_file_}; - std::shared_ptr<LocalTreeMap> tree_map_; + mutable LocalTreeMap tree_map_; /// \brief Try to sync blob between file CAS and executable CAS. /// \param digest Blob digest. |