diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-12-19 11:57:42 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-12-20 11:36:18 +0100 |
commit | 8ef99074b990410a4748e4ec76ff7cc4baf9867d (patch) | |
tree | b524af84f1616d50216e82f2f610497ac4307d55 /src | |
parent | 981f44d47463ebbc3502494ad2f49173785d632b (diff) | |
download | justbuild-8ef99074b990410a4748e4ec76ff7cc4baf9867d.tar.gz |
TreeStructure: make just-mr aware of "tree structure" roots
Diffstat (limited to 'src')
-rw-r--r-- | src/other_tools/just_mr/utils.hpp | 5 | ||||
-rw-r--r-- | src/other_tools/repo_map/repos_to_setup_map.cpp | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/other_tools/just_mr/utils.hpp b/src/other_tools/just_mr/utils.hpp index d0d33a1e..58b6931b 100644 --- a/src/other_tools/just_mr/utils.hpp +++ b/src/other_tools/just_mr/utils.hpp @@ -156,7 +156,7 @@ enum class CheckoutType : std::uint8_t { File, Distdir, GitTree, - Computed + Precomputed }; /// \brief Checkout type map @@ -168,7 +168,8 @@ std::unordered_map<std::string, CheckoutType> const kCheckoutTypeMap = { {"file", CheckoutType::File}, {"distdir", CheckoutType::Distdir}, {"git tree", CheckoutType::GitTree}, - {"computed", CheckoutType::Computed}}; + {"computed", CheckoutType::Precomputed}, + {"tree structure", CheckoutType::Precomputed}}; namespace JustMR::Utils { /// \brief Recursive part of the ResolveRepo function. diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp index 4a8498c5..d8bfe3a3 100644 --- a/src/other_tools/repo_map/repos_to_setup_map.cpp +++ b/src/other_tools/repo_map/repos_to_setup_map.cpp @@ -670,6 +670,10 @@ void PrecomputedRootCheckout(ExpressionPtr const& repo_desc, ws_root.push_back(computed->target_name); ws_root.push_back(computed->config); } + else if (auto tree_structure = result.AsTreeStructure()) { + ws_root.push_back(TreeStructureRoot::kMarker); + ws_root.push_back(tree_structure->repository); + } std::invoke(*setter, std::move(cfg)); }, logger); @@ -860,7 +864,7 @@ auto CreateReposToSetupMap( wrapped_logger); break; } - case CheckoutType::Computed: { + case CheckoutType::Precomputed: { PrecomputedRootCheckout(*resolved_repo_desc, std::move(repos), key, |