From 669d1d8714b258ffd19f1610028374233a143f4b Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 8 Sep 2023 18:15:01 +0200 Subject: 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. --- src/other_tools/just_mr/setup_utils.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/other_tools/just_mr/setup_utils.hpp') 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; /// \brief Setup of a remote API based on just-mr arguments. -auto SetupRemoteApi(std::optional const& remote_exec_addr, - MultiRepoRemoteAuthArguments const& auth) - -> IExecutionApi::Ptr; +[[nodiscard]] auto SetupRemoteApi( + std::optional 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 const& remote_serve_addr, + MultiRepoRemoteAuthArguments const& auth) -> ServeApi::Ptr; } // namespace Utils -- cgit v1.2.3