summaryrefslogtreecommitdiff
path: root/src/other_tools/repo_map
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-01-16 09:49:11 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-01-21 11:06:11 +0100
commitfea52bc9439759779e3c276849372fc812afe7a9 (patch)
treef8936e07f6872f2ecf3f80d6f873af65db55c051 /src/other_tools/repo_map
parent3a8cb22cf6ebfae9ffc411f2499c634dfa009924 (diff)
downloadjustbuild-fea52bc9439759779e3c276849372fc812afe7a9.tar.gz
JustMr: Support absent tree structure roots
Diffstat (limited to 'src/other_tools/repo_map')
-rw-r--r--src/other_tools/repo_map/repos_to_setup_map.cpp10
1 files changed, 10 insertions, 0 deletions
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);