From 662a305959fa0319923544ea10f6321243544db6 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 10 Jan 2025 15:32:58 +0100 Subject: just-mr: support absent computed roots --- src/other_tools/utils/parse_precomputed_root.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/other_tools/utils/parse_precomputed_root.cpp') 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) -- cgit v1.2.3