From dc9a7b8499da9ce7a90546afecd048d0bfb31f38 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 13 Jun 2024 10:16:29 +0200 Subject: Make ServeApi a general class, not a singleton ...and adjust interfaces. --- src/buildtool/main/describe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/buildtool/main/describe.cpp') diff --git a/src/buildtool/main/describe.cpp b/src/buildtool/main/describe.cpp index 467d382a..978adadb 100644 --- a/src/buildtool/main/describe.cpp +++ b/src/buildtool/main/describe.cpp @@ -267,7 +267,7 @@ auto DescribeUserDefinedRule( auto DescribeTarget(BuildMaps::Target::ConfiguredTarget const& id, gsl::not_null const& repo_config, - std::optional> const& serve, + std::optional const& serve, std::size_t jobs, bool print_json) -> int { #ifndef BOOTSTRAP_BUILD_TOOL @@ -285,7 +285,7 @@ auto DescribeTarget(BuildMaps::Target::ConfiguredTarget const& id, // check that just serve and the client use same remote execution // endpoint; it might make sense in the future to remove or avoid this // check, e.g., if remote endpoints are behind proxies. - if (not(*serve)->CheckServeRemoteExecution()) { + if (not serve->CheckServeRemoteExecution()) { Logger::Log(LogLevel::Error, "Inconsistent remote execution endpoint and serve " "endpoint configuration detected."); @@ -302,7 +302,7 @@ auto DescribeTarget(BuildMaps::Target::ConfiguredTarget const& id, repo_name); return kExitFailure; } - if (auto dgst = (*serve)->ServeTargetDescription( + if (auto dgst = serve->ServeTargetDescription( *target_root_id, *(repo_config->TargetFileName(repo_name)), id.target.GetNamedTarget().name)) { -- cgit v1.2.3