diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-11 16:07:50 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-18 12:05:10 +0200 |
commit | ec447408d17c530ce2023d8148dd34a6d8138535 (patch) | |
tree | c644991efe281d3a7fa91451fa2d4fa70884f763 /src/other_tools/root_maps/root_utils.hpp | |
parent | 651af149098289b60cdfb062d36eb435d8e49c52 (diff) | |
download | justbuild-ec447408d17c530ce2023d8148dd34a6d8138535.tar.gz |
Pass ServeApi to just-mr maps by reference
...instead of using singleton calls.
Diffstat (limited to 'src/other_tools/root_maps/root_utils.hpp')
-rw-r--r-- | src/other_tools/root_maps/root_utils.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/other_tools/root_maps/root_utils.hpp b/src/other_tools/root_maps/root_utils.hpp index d154eb3e..aae9e84e 100644 --- a/src/other_tools/root_maps/root_utils.hpp +++ b/src/other_tools/root_maps/root_utils.hpp @@ -21,6 +21,7 @@ #include "gsl/gsl" #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/multithreading/async_map_consumer.hpp" +#include "src/buildtool/serve_api/remote/serve_api.hpp" /// \brief Calls the ServeApi to check whether the serve endpoint has the given /// tree available to build against. @@ -30,6 +31,7 @@ /// whether the serve endpoint knows the tree on ServeApi call success. The /// logger is called with fatal ONLY if this method returns nullopt. [[nodiscard]] auto CheckServeHasAbsentRoot( + ServeApi const& serve, std::string const& tree_id, AsyncMapConsumerLoggerPtr const& logger) -> std::optional<bool>; @@ -53,6 +55,7 @@ /// \returns Status flag, with false if state is deemed fatal, and true /// otherwise. Logger is only called with fatal if returning false. [[nodiscard]] auto EnsureAbsentRootOnServe( + ServeApi const& serve, std::string const& tree_id, std::filesystem::path const& repo_path, std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, |