diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-11-13 12:26:27 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-11-14 14:23:06 +0100 |
commit | 23ea7c18fa594c0e53957a8f97893467c67c941f (patch) | |
tree | 6cb7a370dd00f5e9ca66fbf68c35b7533e1e3846 /src/other_tools/ops_maps | |
parent | 3bc1d8aa17339154c9de88e7ee29ff533041cb6d (diff) | |
download | justbuild-23ea7c18fa594c0e53957a8f97893467c67c941f.tar.gz |
other_tools/ops_maps: Implement IWYU suggestions
Also follow-up changes to ensure build success.
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r-- | src/other_tools/ops_maps/TARGETS | 43 | ||||
-rw-r--r-- | src/other_tools/ops_maps/archive_fetch_map.cpp | 8 | ||||
-rw-r--r-- | src/other_tools/ops_maps/archive_fetch_map.hpp | 2 | ||||
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.cpp | 13 | ||||
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.hpp | 1 | ||||
-rw-r--r-- | src/other_tools/ops_maps/critical_git_op_map.cpp | 4 | ||||
-rw-r--r-- | src/other_tools/ops_maps/critical_git_op_map.hpp | 3 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_tree_fetch_map.cpp | 16 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_tree_fetch_map.hpp | 2 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_update_map.cpp | 7 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_update_map.hpp | 3 | ||||
-rw-r--r-- | src/other_tools/ops_maps/import_to_git_map.cpp | 9 | ||||
-rw-r--r-- | src/other_tools/ops_maps/import_to_git_map.hpp | 5 |
13 files changed, 83 insertions, 33 deletions
diff --git a/src/other_tools/ops_maps/TARGETS b/src/other_tools/ops_maps/TARGETS index 545de74f..22a91d0c 100644 --- a/src/other_tools/ops_maps/TARGETS +++ b/src/other_tools/ops_maps/TARGETS @@ -5,11 +5,12 @@ , "srcs": ["critical_git_op_map.cpp"] , "deps": [ ["src/buildtool/multithreading", "async_map_consumer"] - , ["src/other_tools/git_operations", "git_operations"] + , ["src/other_tools/git_operations", "git_ops_types"] , ["src/utils/cpp", "hash_combine"] , ["src/utils/cpp", "path_hash"] ] , "stage": ["src", "other_tools", "ops_maps"] + , "private-deps": [["src/other_tools/git_operations", "git_operations"]] } , "import_to_git_map": { "type": ["@", "rules", "CC", "library"] @@ -19,18 +20,19 @@ , "deps": [ "critical_git_op_map" , ["@", "gsl", "", "gsl"] + , ["src/buildtool/file_system", "git_cas"] + , ["src/buildtool/multithreading", "async_map_consumer"] , ["src/buildtool/storage", "config"] - , ["src/other_tools/git_operations", "git_repo_remote"] , ["src/utils/cpp", "path"] , ["src/utils/cpp", "path_hash"] ] , "stage": ["src", "other_tools", "ops_maps"] , "private-deps": [ ["@", "fmt", "", "fmt"] - , ["src/buildtool/execution_api/common", "common"] - , ["src/buildtool/execution_api/local", "config"] , ["src/buildtool/multithreading", "task_system"] - , ["src/buildtool/storage", "fs_utils"] + , ["src/other_tools/git_operations", "git_ops_types"] + , ["src/other_tools/git_operations", "git_repo_remote"] + , ["src/utils/cpp", "tmp_dir"] ] } , "git_update_map": @@ -40,9 +42,9 @@ , "srcs": ["git_update_map.cpp"] , "deps": [ ["@", "gsl", "", "gsl"] + , ["src/buildtool/file_system", "git_cas"] , ["src/buildtool/multithreading", "async_map_consumer"] , ["src/buildtool/storage", "config"] - , ["src/other_tools/git_operations", "git_repo_remote"] , ["src/other_tools/just_mr/progress_reporting", "progress"] , ["src/other_tools/just_mr/progress_reporting", "statistics"] , ["src/utils/cpp", "hash_combine"] @@ -50,8 +52,8 @@ , "stage": ["src", "other_tools", "ops_maps"] , "private-deps": [ ["@", "fmt", "", "fmt"] - , ["src/buildtool/execution_api/local", "config"] - , ["src/buildtool/storage", "fs_utils"] + , ["src/buildtool/progress_reporting", "task_tracker"] + , ["src/other_tools/git_operations", "git_repo_remote"] ] } , "content_cas_map": @@ -77,12 +79,18 @@ , "stage": ["src", "other_tools", "ops_maps"] , "private-deps": [ ["@", "fmt", "", "fmt"] + , ["src/buildtool/common", "common"] + , ["src/buildtool/crypto", "hasher"] , ["src/buildtool/execution_api/serve", "utils"] - , ["src/buildtool/file_system", "file_storage"] + , ["src/buildtool/file_system", "file_system_manager"] + , ["src/buildtool/file_system", "git_repo"] + , ["src/buildtool/file_system", "object_type"] + , ["src/buildtool/progress_reporting", "task_tracker"] , ["src/buildtool/storage", "fs_utils"] + , ["src/other_tools/git_operations", "git_ops_types"] , ["src/other_tools/git_operations", "git_repo_remote"] , ["src/other_tools/utils", "content"] - , ["src/other_tools/utils", "curl_url_handle"] + , ["src/utils/cpp", "expected"] ] } , "archive_fetch_map": @@ -95,15 +103,16 @@ , ["@", "gsl", "", "gsl"] , ["src/buildtool/crypto", "hash_info"] , ["src/buildtool/execution_api/common", "common"] + , ["src/buildtool/multithreading", "async_map_consumer"] , ["src/buildtool/storage", "storage"] , ["src/other_tools/just_mr/progress_reporting", "statistics"] ] , "stage": ["src", "other_tools", "ops_maps"] , "private-deps": [ ["@", "fmt", "", "fmt"] - , ["src/buildtool/file_system", "file_storage"] + , ["src/buildtool/common", "common"] , ["src/buildtool/file_system", "file_system_manager"] - , ["src/other_tools/just_mr", "utils"] + , ["src/buildtool/file_system", "object_type"] ] } , "git_tree_fetch_map": @@ -115,6 +124,7 @@ [ ["@", "gsl", "", "gsl"] , ["src/buildtool/crypto", "hash_info"] , ["src/buildtool/execution_api/common", "common"] + , ["src/buildtool/multithreading", "async_map_consumer"] , ["src/buildtool/serve_api/remote", "serve_api"] , ["src/buildtool/storage", "config"] , ["src/buildtool/storage", "storage"] @@ -125,15 +135,20 @@ , "stage": ["src", "other_tools", "ops_maps"] , "private-deps": [ ["@", "fmt", "", "fmt"] + , ["@", "json", "", "json"] , ["src/buildtool/common", "common"] , ["src/buildtool/common", "config"] - , ["src/buildtool/common", "protocol_traits"] , ["src/buildtool/execution_api/serve", "mr_git_api"] - , ["src/buildtool/execution_api/serve", "utils"] , ["src/buildtool/file_system", "file_system_manager"] + , ["src/buildtool/file_system", "git_cas"] + , ["src/buildtool/file_system", "git_repo"] + , ["src/buildtool/file_system", "object_type"] , ["src/buildtool/multithreading", "task_system"] + , ["src/buildtool/progress_reporting", "task_tracker"] , ["src/buildtool/system", "system_command"] + , ["src/other_tools/git_operations", "git_ops_types"] , ["src/other_tools/git_operations", "git_repo_remote"] + , ["src/utils/cpp", "tmp_dir"] ] } } diff --git a/src/other_tools/ops_maps/archive_fetch_map.cpp b/src/other_tools/ops_maps/archive_fetch_map.cpp index 91d71ce6..2732d494 100644 --- a/src/other_tools/ops_maps/archive_fetch_map.cpp +++ b/src/other_tools/ops_maps/archive_fetch_map.cpp @@ -14,12 +14,16 @@ #include "src/other_tools/ops_maps/archive_fetch_map.hpp" +#include <memory> +#include <optional> #include <string> +#include <vector> #include "fmt/core.h" -#include "src/buildtool/file_system/file_storage.hpp" +#include "src/buildtool/common/artifact.hpp" +#include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" -#include "src/other_tools/just_mr/utils.hpp" +#include "src/buildtool/file_system/object_type.hpp" namespace { diff --git a/src/other_tools/ops_maps/archive_fetch_map.hpp b/src/other_tools/ops_maps/archive_fetch_map.hpp index e1c26b45..f2753141 100644 --- a/src/other_tools/ops_maps/archive_fetch_map.hpp +++ b/src/other_tools/ops_maps/archive_fetch_map.hpp @@ -18,12 +18,12 @@ #include <cstddef> #include <filesystem> #include <functional> -#include <optional> #include <string> #include "gsl/gsl" #include "src/buildtool/crypto/hash_info.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" +#include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/storage/storage.hpp" #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/other_tools/ops_maps/content_cas_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 a8e42adb..9cfef72a 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -14,15 +14,24 @@ #include "src/other_tools/ops_maps/content_cas_map.hpp" +#include <filesystem> +#include <memory> #include <utility> // std::move #include "fmt/core.h" +#include "src/buildtool/common/artifact.hpp" +#include "src/buildtool/common/artifact_digest.hpp" +#include "src/buildtool/crypto/hasher.hpp" #include "src/buildtool/execution_api/serve/utils.hpp" -#include "src/buildtool/file_system/file_storage.hpp" +#include "src/buildtool/file_system/file_system_manager.hpp" +#include "src/buildtool/file_system/git_repo.hpp" +#include "src/buildtool/file_system/object_type.hpp" +#include "src/buildtool/progress_reporting/task_tracker.hpp" #include "src/buildtool/storage/fs_utils.hpp" +#include "src/other_tools/git_operations/git_ops_types.hpp" #include "src/other_tools/git_operations/git_repo_remote.hpp" #include "src/other_tools/utils/content.hpp" -#include "src/other_tools/utils/curl_url_handle.hpp" +#include "src/utils/cpp/expected.hpp" namespace { diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp index e161be19..2eb28879 100644 --- a/src/other_tools/ops_maps/content_cas_map.hpp +++ b/src/other_tools/ops_maps/content_cas_map.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_CONTENT_CAS_MAP_HPP #include <cstddef> +#include <functional> #include <optional> #include <string> #include <vector> diff --git a/src/other_tools/ops_maps/critical_git_op_map.cpp b/src/other_tools/ops_maps/critical_git_op_map.cpp index b7981db8..67ffced2 100644 --- a/src/other_tools/ops_maps/critical_git_op_map.cpp +++ b/src/other_tools/ops_maps/critical_git_op_map.cpp @@ -14,6 +14,10 @@ #include "src/other_tools/ops_maps/critical_git_op_map.hpp" +#include <utility> + +#include "src/other_tools/git_operations/git_operations.hpp" + // define the mapping to actual operations being called GitOpKeyMap const GitOpKey::kMap = { {GitOpType::INITIAL_COMMIT, CriticalGitOps::GitInitialCommit}, diff --git a/src/other_tools/ops_maps/critical_git_op_map.hpp b/src/other_tools/ops_maps/critical_git_op_map.hpp index 5832462a..badf5235 100644 --- a/src/other_tools/ops_maps/critical_git_op_map.hpp +++ b/src/other_tools/ops_maps/critical_git_op_map.hpp @@ -17,6 +17,7 @@ #include <cstddef> #include <filesystem> +#include <functional> #include <memory> #include <mutex> #include <optional> @@ -24,7 +25,7 @@ #include <unordered_map> #include "src/buildtool/multithreading/async_map_consumer.hpp" -#include "src/other_tools/git_operations/git_operations.hpp" +#include "src/other_tools/git_operations/git_ops_types.hpp" #include "src/utils/cpp/hash_combine.hpp" #include "src/utils/cpp/path_hash.hpp" 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 0980e8a7..f233fac7 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp @@ -15,20 +15,28 @@ #include "src/other_tools/ops_maps/git_tree_fetch_map.hpp" #include <cstdlib> -#include <tuple> // std::ignore +#include <filesystem> +#include <iterator> +#include <memory> +#include <optional> #include <utility> // std::move #include "fmt/core.h" +#include "nlohmann/json.hpp" +#include "src/buildtool/common/artifact.hpp" #include "src/buildtool/common/artifact_digest.hpp" -#include "src/buildtool/common/protocol_traits.hpp" #include "src/buildtool/common/repository_config.hpp" -#include "src/buildtool/execution_api/common/execution_common.hpp" #include "src/buildtool/execution_api/serve/mr_git_api.hpp" -#include "src/buildtool/execution_api/serve/utils.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" +#include "src/buildtool/file_system/git_cas.hpp" +#include "src/buildtool/file_system/git_repo.hpp" +#include "src/buildtool/file_system/object_type.hpp" #include "src/buildtool/multithreading/task_system.hpp" +#include "src/buildtool/progress_reporting/task_tracker.hpp" #include "src/buildtool/system/system_command.hpp" +#include "src/other_tools/git_operations/git_ops_types.hpp" #include "src/other_tools/git_operations/git_repo_remote.hpp" +#include "src/utils/cpp/tmp_dir.hpp" namespace { 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 7ff6b301..156e822a 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.hpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.hpp @@ -18,13 +18,13 @@ #include <cstddef> #include <functional> #include <map> -#include <optional> #include <string> #include <vector> #include "gsl/gsl" #include "src/buildtool/crypto/hash_info.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" +#include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/storage.hpp" diff --git a/src/other_tools/ops_maps/git_update_map.cpp b/src/other_tools/ops_maps/git_update_map.cpp index 510b9d1c..ddbec3bc 100644 --- a/src/other_tools/ops_maps/git_update_map.cpp +++ b/src/other_tools/ops_maps/git_update_map.cpp @@ -14,9 +14,12 @@ #include "src/other_tools/ops_maps/git_update_map.hpp" +#include <memory> +#include <optional> + #include "fmt/core.h" -#include "src/buildtool/execution_api/local/config.hpp" -#include "src/buildtool/storage/fs_utils.hpp" +#include "src/buildtool/progress_reporting/task_tracker.hpp" +#include "src/other_tools/git_operations/git_repo_remote.hpp" auto CreateGitUpdateMap( GitCASPtr const& git_cas, diff --git a/src/other_tools/ops_maps/git_update_map.hpp b/src/other_tools/ops_maps/git_update_map.hpp index 91377407..1bf9256c 100644 --- a/src/other_tools/ops_maps/git_update_map.hpp +++ b/src/other_tools/ops_maps/git_update_map.hpp @@ -18,13 +18,12 @@ #include <cstddef> #include <functional> #include <string> -#include <utility> #include <vector> #include "gsl/gsl" +#include "src/buildtool/file_system/git_cas.hpp" #include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/storage/config.hpp" -#include "src/other_tools/git_operations/git_repo_remote.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/utils/cpp/hash_combine.hpp" diff --git a/src/other_tools/ops_maps/import_to_git_map.cpp b/src/other_tools/ops_maps/import_to_git_map.cpp index 02da0475..bec7c1e7 100644 --- a/src/other_tools/ops_maps/import_to_git_map.cpp +++ b/src/other_tools/ops_maps/import_to_git_map.cpp @@ -14,11 +14,14 @@ #include "src/other_tools/ops_maps/import_to_git_map.hpp" +#include <memory> +#include <optional> + #include "fmt/core.h" -#include "src/buildtool/execution_api/common/execution_common.hpp" -#include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/multithreading/task_system.hpp" -#include "src/buildtool/storage/fs_utils.hpp" +#include "src/other_tools/git_operations/git_ops_types.hpp" +#include "src/other_tools/git_operations/git_repo_remote.hpp" +#include "src/utils/cpp/tmp_dir.hpp" namespace { diff --git a/src/other_tools/ops_maps/import_to_git_map.hpp b/src/other_tools/ops_maps/import_to_git_map.hpp index d0a59f3c..510016b3 100644 --- a/src/other_tools/ops_maps/import_to_git_map.hpp +++ b/src/other_tools/ops_maps/import_to_git_map.hpp @@ -17,12 +17,15 @@ #include <cstddef> #include <filesystem> +#include <functional> #include <string> #include <utility> +#include <vector> #include "gsl/gsl" +#include "src/buildtool/file_system/git_cas.hpp" +#include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/storage/config.hpp" -#include "src/other_tools/git_operations/git_repo_remote.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" #include "src/utils/cpp/path.hpp" #include "src/utils/cpp/path_hash.hpp" |