From 8669d48933731f224474a9b1dc55824f87ae26a7 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 25 Jul 2024 14:53:18 +0200 Subject: Use LocalContext in execution and serve services The context is passed by not_null const pointer in order to avoid binding to temporaries, and it or parts of it get stored by const ref where needed. --- .../execution_api/execution_service/server_implementation.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/server_implementation.hpp') diff --git a/src/buildtool/execution_api/execution_service/server_implementation.hpp b/src/buildtool/execution_api/execution_service/server_implementation.hpp index d9e16dad..4df8375f 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.hpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.hpp @@ -20,9 +20,9 @@ #include #include +#include "gsl/gsl" #include "src/buildtool/execution_api/common/api_bundle.hpp" -#include "src/buildtool/storage/config.hpp" -#include "src/buildtool/storage/storage.hpp" +#include "src/buildtool/execution_api/local/context.hpp" class ServerImpl final { public: @@ -42,13 +42,11 @@ class ServerImpl final { auto operator=(ServerImpl&&) noexcept -> ServerImpl& = default; /// \brief Start the execution service. - /// \param storage_config StorageConfig to be used. - /// \param storage Storage to be used. + /// \param local_context The LocalContext to be used. /// \param apis Apis to be used, only local api is actually /// needed. /// \param op_exponent Log2 threshold for operation cache. - auto Run(StorageConfig const& storage_config, - Storage const& storage, + auto Run(gsl::not_null const& local_context, ApiBundle const& apis, std::optional op_exponent) -> bool; -- cgit v1.2.3