summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-01-10 15:32:58 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-01-22 10:40:32 +0100
commit662a305959fa0319923544ea10f6321243544db6 (patch)
tree2067144799637bfe5dd8405b0dabb21ff0f72b58
parent6c4ecdb57f9140dc8474da2f83660fc5f977cc6d (diff)
downloadjustbuild-662a305959fa0319923544ea10f6321243544db6.tar.gz
just-mr: support absent computed roots
-rw-r--r--src/other_tools/repo_map/repos_to_setup_map.cpp1
-rw-r--r--src/other_tools/utils/parse_precomputed_root.cpp8
2 files changed, 8 insertions, 1 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 91a69c8b..a7cf8e1d 100644
--- a/src/other_tools/repo_map/repos_to_setup_map.cpp
+++ b/src/other_tools/repo_map/repos_to_setup_map.cpp
@@ -677,6 +677,7 @@ void PrecomputedRootCheckout(ExpressionPtr const& repo_desc,
ws_root.push_back(computed->target_module);
ws_root.push_back(computed->target_name);
ws_root.push_back(computed->config);
+ absent = computed->absent;
}
else if (auto tree_structure = result.AsTreeStructure()) {
ws_root.push_back(TreeStructureRoot::kMarker);
diff --git a/src/other_tools/utils/parse_precomputed_root.cpp b/src/other_tools/utils/parse_precomputed_root.cpp
index c5eebf90..df520158 100644
--- a/src/other_tools/utils/parse_precomputed_root.cpp
+++ b/src/other_tools/utils/parse_precomputed_root.cpp
@@ -81,12 +81,18 @@ namespace {
return unexpected{fmt::format(
"Unsupported value for key \"config\":\n{}", config->ToString())};
}
+
+ auto absent = ParseAbsent(repository);
+ if (not absent.has_value()) {
+ return unexpected{std::move(absent).error()};
+ }
+
return ComputedRoot{.repository = repo->String(),
.target_module = target_module->String(),
.target_name = target_module->String(),
.config = config.IsNotNull() ? config->ToJson()
: nlohmann::json::object(),
- .absent = false};
+ .absent = *absent};
}
[[nodiscard]] auto ParseTreeStructureRoot(ExpressionPtr const& repository)