diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-12-17 16:51:12 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-12-19 16:37:59 +0100 |
commit | bd410a2557b6127d47396cd0740347e4af0766df (patch) | |
tree | e8f9a976fb55751ede017c0746a43b682513ef7d /src/other_tools/utils | |
parent | 75abf567afd7a130e9fbc90c6b7ac03ac40651c1 (diff) | |
download | justbuild-bd410a2557b6127d47396cd0740347e4af0766df.tar.gz |
Remove FileRoot::ComputedRoot
Diffstat (limited to 'src/other_tools/utils')
-rw-r--r-- | src/other_tools/utils/TARGETS | 2 | ||||
-rw-r--r-- | src/other_tools/utils/parse_computed_root.cpp | 14 | ||||
-rw-r--r-- | src/other_tools/utils/parse_computed_root.hpp | 5 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/other_tools/utils/TARGETS b/src/other_tools/utils/TARGETS index efeb5494..8e1803b9 100644 --- a/src/other_tools/utils/TARGETS +++ b/src/other_tools/utils/TARGETS @@ -103,7 +103,7 @@ , "deps": [ ["@", "gsl", "", "gsl"] , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] - , ["src/buildtool/file_system", "file_root"] + , ["src/buildtool/file_system", "precomputed_root"] , ["src/utils/cpp", "expected"] ] , "private-deps": diff --git a/src/other_tools/utils/parse_computed_root.cpp b/src/other_tools/utils/parse_computed_root.cpp index ccc01d92..540f43c0 100644 --- a/src/other_tools/utils/parse_computed_root.cpp +++ b/src/other_tools/utils/parse_computed_root.cpp @@ -50,7 +50,7 @@ auto ComputedRootParser::GetTargetRepository() const } auto ComputedRootParser::GetResult() const - -> expected<FileRoot::ComputedRoot, std::string> { + -> expected<ComputedRoot, std::string> { auto const repo = GetTargetRepository(); if (not repo) { return unexpected{repo.error()}; @@ -77,10 +77,10 @@ auto ComputedRootParser::GetResult() const return unexpected{fmt::format("Unsupported value {} for key \"config\"", config->ToString())}; } - return FileRoot::ComputedRoot{.repository = *repo, - .target_module = target_module->String(), - .target_name = target_module->String(), - .config = config.IsNotNull() - ? config->ToJson() - : nlohmann::json::object()}; + return ComputedRoot{.repository = *repo, + .target_module = target_module->String(), + .target_name = target_module->String(), + .config = config.IsNotNull() + ? config->ToJson() + : nlohmann::json::object()}; } diff --git a/src/other_tools/utils/parse_computed_root.hpp b/src/other_tools/utils/parse_computed_root.hpp index e23284da..2cc54c87 100644 --- a/src/other_tools/utils/parse_computed_root.hpp +++ b/src/other_tools/utils/parse_computed_root.hpp @@ -20,7 +20,7 @@ #include "gsl/gsl" #include "src/buildtool/build_engine/expression/expression_ptr.hpp" -#include "src/buildtool/file_system/file_root.hpp" +#include "src/buildtool/file_system/precomputed_root.hpp" #include "src/utils/cpp/expected.hpp" class ComputedRootParser final { @@ -36,8 +36,7 @@ class ComputedRootParser final { [[nodiscard]] auto GetTargetRepository() const -> expected<std::string, std::string>; - [[nodiscard]] auto GetResult() const - -> expected<FileRoot::ComputedRoot, std::string>; + [[nodiscard]] auto GetResult() const -> expected<ComputedRoot, std::string>; private: ExpressionPtr const& repository_; |