summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/setup_utils.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-09-08 18:15:01 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-09-13 16:14:43 +0200
commit669d1d8714b258ffd19f1610028374233a143f4b (patch)
treeef3774508075f028637844fac2095a5dc2cbce08 /src/other_tools/just_mr/setup_utils.hpp
parentf48e1ebe7f08159004bf9a88d5a9e474ff32dbb1 (diff)
downloadjustbuild-669d1d8714b258ffd19f1610028374233a143f4b.tar.gz
just-mr: Implement 'absent' roots
...via an 'absent' pragma in repository descriptions. For 'git'-type repositories, first interrogates a 'just serve' remote, if given, before reverting to fetching from the network.
Diffstat (limited to 'src/other_tools/just_mr/setup_utils.hpp')
-rw-r--r--src/other_tools/just_mr/setup_utils.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/other_tools/just_mr/setup_utils.hpp b/src/other_tools/just_mr/setup_utils.hpp
index 2bc067cf..3294a7e5 100644
--- a/src/other_tools/just_mr/setup_utils.hpp
+++ b/src/other_tools/just_mr/setup_utils.hpp
@@ -24,6 +24,7 @@
#include "src/buildtool/build_engine/expression/configuration.hpp"
#include "src/buildtool/build_engine/expression/expression_ptr.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/serve_api/remote/serve_api.hpp"
#include "src/other_tools/just_mr/cli.hpp"
/* Setup-related constants and utilities for just-mr */
@@ -58,9 +59,14 @@ void DefaultReachableRepositories(
-> std::shared_ptr<Configuration>;
/// \brief Setup of a remote API based on just-mr arguments.
-auto SetupRemoteApi(std::optional<std::string> const& remote_exec_addr,
- MultiRepoRemoteAuthArguments const& auth)
- -> IExecutionApi::Ptr;
+[[nodiscard]] auto SetupRemoteApi(
+ std::optional<std::string> const& remote_exec_addr,
+ MultiRepoRemoteAuthArguments const& auth) -> IExecutionApi::Ptr;
+
+/// \brief Setup of a 'just serve' remote API based on just-mr arguments.
+[[nodiscard]] auto SetupServeApi(
+ std::optional<std::string> const& remote_serve_addr,
+ MultiRepoRemoteAuthArguments const& auth) -> ServeApi::Ptr;
} // namespace Utils