diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-01-10 15:32:58 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-01-22 10:40:32 +0100 |
commit | 662a305959fa0319923544ea10f6321243544db6 (patch) | |
tree | 2067144799637bfe5dd8405b0dabb21ff0f72b58 /src/other_tools/utils | |
parent | 6c4ecdb57f9140dc8474da2f83660fc5f977cc6d (diff) | |
download | justbuild-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.cpp | 8 |
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) |