diff options
18 files changed, 54 insertions, 53 deletions
diff --git a/src/other_tools/ops_maps/archive_fetch_map.cpp b/src/other_tools/ops_maps/archive_fetch_map.cpp index bf655dfd..883ffa76 100644 --- a/src/other_tools/ops_maps/archive_fetch_map.cpp +++ b/src/other_tools/ops_maps/archive_fetch_map.cpp @@ -29,8 +29,8 @@ namespace { void ProcessContent( std::filesystem::path const& content_path, std::filesystem::path const& target_name, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::string const& content, ArchiveFetchMap::SetterPtr const& setter, ArchiveFetchMap::LoggerPtr const& logger) { @@ -71,8 +71,8 @@ void ProcessContent( auto CreateArchiveFetchMap( gsl::not_null<ContentCASMap*> const& content_cas_map, std::filesystem::path const& fetch_dir, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> ArchiveFetchMap { auto fetch_archive = [content_cas_map, fetch_dir, local_api, remote_api]( auto ts, diff --git a/src/other_tools/ops_maps/archive_fetch_map.hpp b/src/other_tools/ops_maps/archive_fetch_map.hpp index 7a676592..f6e3d987 100644 --- a/src/other_tools/ops_maps/archive_fetch_map.hpp +++ b/src/other_tools/ops_maps/archive_fetch_map.hpp @@ -29,8 +29,8 @@ using ArchiveFetchMap = AsyncMapConsumer<ArchiveContent, bool>; [[nodiscard]] auto CreateArchiveFetchMap( gsl::not_null<ContentCASMap*> const& content_cas_map, std::filesystem::path const& fetch_dir, // should exist! - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> ArchiveFetchMap; #endif // INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_ARCHIVE_FETCH_MAP_HPP diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 190c9611..4d1ca013 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -109,8 +109,8 @@ auto CreateContentCASMap( CAInfoPtr const& ca_info, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> ContentCASMap { auto ensure_in_cas = [just_mr_paths, additional_mirrors, diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp index 0fb66970..25facd07 100644 --- a/src/other_tools/ops_maps/content_cas_map.hpp +++ b/src/other_tools/ops_maps/content_cas_map.hpp @@ -85,8 +85,8 @@ using ContentCASMap = AsyncMapConsumer<ArchiveContent, std::nullptr_t>; CAInfoPtr const& ca_info, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> ContentCASMap; namespace std { diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.cpp b/src/other_tools/ops_maps/git_tree_fetch_map.cpp index 844aad31..c518c9e9 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp @@ -35,7 +35,7 @@ namespace { void BackupToRemote(std::string const& tree_id, - gsl::not_null<IExecutionApi*> const& remote_api, + gsl::not_null<IExecutionApi const*> const& remote_api, GitTreeFetchMap::LoggerPtr const& logger) { // try to back up to remote CAS auto repo = RepositoryConfig{}; @@ -67,8 +67,8 @@ void MoveCASTreeToGit( std::string const& tree_id, ArtifactDigest const& digest, gsl::not_null<ImportToGitMap*> const& import_to_git_map, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool backup_to_remote, gsl::not_null<TaskSystem*> const& ts, GitTreeFetchMap::SetterPtr const& setter, @@ -130,8 +130,8 @@ auto CreateGitTreeFetchMap( std::string const& git_bin, std::vector<std::string> const& launcher, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool backup_to_remote, std::size_t jobs) -> GitTreeFetchMap { auto tree_to_cache = [critical_git_op_map, diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.hpp b/src/other_tools/ops_maps/git_tree_fetch_map.hpp index 93ca450f..82c858d5 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.hpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.hpp @@ -61,8 +61,8 @@ using GitTreeFetchMap = AsyncMapConsumer<GitTreeInfo, bool>; std::string const& git_bin, std::vector<std::string> const& launcher, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool backup_to_remote, std::size_t jobs) -> GitTreeFetchMap; diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp index 0045e354..a4681a6a 100644 --- a/src/other_tools/root_maps/commit_git_map.cpp +++ b/src/other_tools/root_maps/commit_git_map.cpp @@ -63,7 +63,7 @@ void EnsureRootAsAbsent( std::filesystem::path const& repo_root, GitRepoInfo const& repo_info, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, CommitGitMap::SetterPtr const& ws_setter, CommitGitMap::LoggerPtr const& logger) { // this is an absent root @@ -412,8 +412,8 @@ void EnsureCommit( std::string const& git_bin, std::vector<std::string> const& launcher, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool fetch_absent, gsl::not_null<TaskSystem*> const& ts, CommitGitMap::SetterPtr const& ws_setter, @@ -924,8 +924,8 @@ auto CreateCommitGitMap( std::string const& git_bin, std::vector<std::string> const& launcher, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool fetch_absent, std::size_t jobs) -> CommitGitMap { auto commit_to_git = [critical_git_op_map, diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp index 4cdc7fd9..d9f1a941 100644 --- a/src/other_tools/root_maps/commit_git_map.hpp +++ b/src/other_tools/root_maps/commit_git_map.hpp @@ -82,8 +82,8 @@ using CommitGitMap = std::string const& git_bin, std::vector<std::string> const& launcher, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool fetch_absent, std::size_t jobs) -> CommitGitMap; diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index f014a227..4052b963 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -56,7 +56,7 @@ void EnsureRootAsAbsent( std::string const& tree_id, ArchiveRepoInfo const& key, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool is_cache_hit, ContentGitMap::SetterPtr const& ws_setter, ContentGitMap::LoggerPtr const& logger) { @@ -176,7 +176,7 @@ void ResolveContentTree( bool is_cache_hit, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<TaskSystem*> const& ts, @@ -365,7 +365,7 @@ void WriteIdFileAndSetWSRoot( std::filesystem::path const& archive_tree_id_file, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<TaskSystem*> const& ts, @@ -426,7 +426,7 @@ void ExtractAndImportToGit( std::filesystem::path const& archive_tree_id_file, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, @@ -510,7 +510,7 @@ auto CreateContentGitMap( gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool fetch_absent, std::size_t jobs) -> ContentGitMap { auto gitify_content = [content_cas_map, diff --git a/src/other_tools/root_maps/content_git_map.hpp b/src/other_tools/root_maps/content_git_map.hpp index 12623440..d7f2c531 100644 --- a/src/other_tools/root_maps/content_git_map.hpp +++ b/src/other_tools/root_maps/content_git_map.hpp @@ -44,7 +44,7 @@ using ContentGitMap = gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, bool fetch_absent, std::size_t jobs) -> ContentGitMap; diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 7d4c7da8..94f923c1 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -133,8 +133,8 @@ auto CreateDistdirGitMap( gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> DistdirGitMap { auto distdir_to_git = [content_cas_map, import_to_git_map, diff --git a/src/other_tools/root_maps/distdir_git_map.hpp b/src/other_tools/root_maps/distdir_git_map.hpp index b6413e26..1a350394 100644 --- a/src/other_tools/root_maps/distdir_git_map.hpp +++ b/src/other_tools/root_maps/distdir_git_map.hpp @@ -55,8 +55,8 @@ using DistdirGitMap = gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> DistdirGitMap; namespace std { diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 6fa4b183..43cb0c24 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -38,7 +38,7 @@ void CheckServeAndSetRoot( std::string const& repo_root, bool absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { // if serve endpoint is given, try to ensure it has this tree available to @@ -102,7 +102,7 @@ void ResolveFilePathTree( gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, gsl::not_null<TaskSystem*> const& ts, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { @@ -256,7 +256,7 @@ auto CreateFilePathGitMap( gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs, std::string multi_repo_tool_name, std::string build_tool_name) -> FilePathGitMap { diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp index fbe20a13..a84ec947 100644 --- a/src/other_tools/root_maps/fpath_git_map.hpp +++ b/src/other_tools/root_maps/fpath_git_map.hpp @@ -55,7 +55,7 @@ using FilePathGitMap = AsyncMapConsumer<FpathInfo, nlohmann::json>; gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs, std::string multi_repo_tool_name, std::string build_tool_name) -> FilePathGitMap; diff --git a/src/other_tools/root_maps/root_utils.cpp b/src/other_tools/root_maps/root_utils.cpp index 7df58f37..efc4b6e0 100644 --- a/src/other_tools/root_maps/root_utils.cpp +++ b/src/other_tools/root_maps/root_utils.cpp @@ -39,7 +39,7 @@ 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, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, AsyncMapConsumerLoggerPtr const& logger, bool no_sync_is_fatal) -> bool { if (remote_api) { diff --git a/src/other_tools/root_maps/root_utils.hpp b/src/other_tools/root_maps/root_utils.hpp index aae9e84e..7e47dc81 100644 --- a/src/other_tools/root_maps/root_utils.hpp +++ b/src/other_tools/root_maps/root_utils.hpp @@ -58,7 +58,7 @@ ServeApi const& serve, std::string const& tree_id, std::filesystem::path const& repo_path, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, AsyncMapConsumerLoggerPtr const& logger, bool no_sync_is_fatal) -> bool; diff --git a/src/other_tools/root_maps/tree_id_git_map.cpp b/src/other_tools/root_maps/tree_id_git_map.cpp index 503b3c30..5366ee86 100644 --- a/src/other_tools/root_maps/tree_id_git_map.cpp +++ b/src/other_tools/root_maps/tree_id_git_map.cpp @@ -26,13 +26,14 @@ namespace { /// \brief Guarantees it terminates by either calling the setter or calling the /// logger with fatal. -void UploadToServeAndSetRoot(ServeApi const& serve, - std::string const& tree_id, - ArtifactDigest const& digest, - gsl::not_null<IExecutionApi*> const& remote_api, - bool ignore_special, - TreeIdGitMap::SetterPtr const& setter, - TreeIdGitMap::LoggerPtr const& logger) { +void UploadToServeAndSetRoot( + ServeApi const& serve, + std::string const& tree_id, + ArtifactDigest const& digest, + gsl::not_null<IExecutionApi const*> const& remote_api, + bool ignore_special, + TreeIdGitMap::SetterPtr const& setter, + TreeIdGitMap::LoggerPtr const& logger) { // upload to remote CAS auto repo_config = RepositoryConfig{}; if (repo_config.SetGitCAS(StorageConfig::GitRoot())) { @@ -79,8 +80,8 @@ void MoveCASTreeToGitAndProcess( std::string const& tree_id, ArtifactDigest const& digest, gsl::not_null<ImportToGitMap*> const& import_to_git_map, - gsl::not_null<IExecutionApi*> const& local_api, - gsl::not_null<IExecutionApi*> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + gsl::not_null<IExecutionApi const*> const& remote_api, bool ignore_special, gsl::not_null<TaskSystem*> const& ts, TreeIdGitMap::SetterPtr const& setter, @@ -148,8 +149,8 @@ auto CreateTreeIdGitMap( gsl::not_null<ImportToGitMap*> const& import_to_git_map, bool fetch_absent, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> TreeIdGitMap { auto tree_to_git = [git_tree_fetch_map, critical_git_op_map, diff --git a/src/other_tools/root_maps/tree_id_git_map.hpp b/src/other_tools/root_maps/tree_id_git_map.hpp index 0d9611e4..d9b7c1e4 100644 --- a/src/other_tools/root_maps/tree_id_git_map.hpp +++ b/src/other_tools/root_maps/tree_id_git_map.hpp @@ -70,8 +70,8 @@ using TreeIdGitMap = gsl::not_null<ImportToGitMap*> const& import_to_git_map, bool fetch_absent, std::optional<ServeApi> const& serve, - gsl::not_null<IExecutionApi*> const& local_api, - std::optional<gsl::not_null<IExecutionApi*>> const& remote_api, + gsl::not_null<IExecutionApi const*> const& local_api, + std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, std::size_t jobs) -> TreeIdGitMap; #endif // INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_TREE_ID_GIT_MAP_HPP |