summaryrefslogtreecommitdiff
path: root/src/other_tools/utils
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 /src/other_tools/utils
parent6c4ecdb57f9140dc8474da2f83660fc5f977cc6d (diff)
downloadjustbuild-662a305959fa0319923544ea10f6321243544db6.tar.gz
just-mr: support absent computed roots
Diffstat (limited to 'src/other_tools/utils')
-rw-r--r--src/other_tools/utils/parse_precomputed_root.cpp8
1 files changed, 7 insertions, 1 deletions
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)