From fea52bc9439759779e3c276849372fc812afe7a9 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 16 Jan 2025 09:49:11 +0100 Subject: JustMr: Support absent tree structure roots --- src/other_tools/repo_map/repos_to_setup_map.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/other_tools/repo_map') 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 383f763d..91a69c8b 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,7 @@ void PrecomputedRootCheckout(ExpressionPtr const& repo_desc, auto& ws_root = cfg["workspace_root"]; SetReposTakeOver(&cfg, repos, repo_name); + bool absent = false; if (auto computed = result.AsComputed()) { ws_root.push_back(ComputedRoot::kMarker); ws_root.push_back(computed->repository); @@ -680,7 +681,16 @@ void PrecomputedRootCheckout(ExpressionPtr const& repo_desc, else if (auto tree_structure = result.AsTreeStructure()) { ws_root.push_back(TreeStructureRoot::kMarker); ws_root.push_back(tree_structure->repository); + + absent = tree_structure->absent; + } + + if (absent) { + auto pragma = nlohmann::json::object(); + pragma["absent"] = true; + ws_root.push_back(pragma); } + std::invoke(*setter, std::move(cfg)); }, logger); -- cgit v1.2.3