diff options
-rw-r--r-- | src/other_tools/just_mr/TARGETS | 61 | ||||
-rw-r--r-- | src/other_tools/just_mr/cli.hpp | 4 | ||||
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 22 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 24 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.hpp | 1 | ||||
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 22 | ||||
-rw-r--r-- | src/other_tools/just_mr/mirrors.hpp | 5 | ||||
-rw-r--r-- | src/other_tools/just_mr/progress_reporting/TARGETS | 1 | ||||
-rw-r--r-- | src/other_tools/just_mr/progress_reporting/progress_reporter.cpp | 4 | ||||
-rw-r--r-- | src/other_tools/just_mr/rc.cpp | 16 | ||||
-rw-r--r-- | src/other_tools/just_mr/rc_merge.cpp | 2 | ||||
-rw-r--r-- | src/other_tools/just_mr/setup.cpp | 20 | ||||
-rw-r--r-- | src/other_tools/just_mr/setup_utils.cpp | 5 | ||||
-rw-r--r-- | src/other_tools/just_mr/setup_utils.hpp | 3 | ||||
-rw-r--r-- | src/other_tools/just_mr/update.cpp | 9 | ||||
-rw-r--r-- | src/other_tools/just_mr/update.hpp | 1 | ||||
-rw-r--r-- | src/other_tools/just_mr/utils.cpp | 3 | ||||
-rw-r--r-- | src/other_tools/just_mr/utils.hpp | 6 |
18 files changed, 169 insertions, 40 deletions
diff --git a/src/other_tools/just_mr/TARGETS b/src/other_tools/just_mr/TARGETS index f0793d5d..9ce20bf5 100644 --- a/src/other_tools/just_mr/TARGETS +++ b/src/other_tools/just_mr/TARGETS @@ -8,16 +8,20 @@ , "exit_codes" , "fetch" , "launch" + , "mirrors" , "rc" , "setup" , "setup_utils" , "update" + , "utils" , ["@", "cli11", "", "cli11"] , ["@", "gsl", "", "gsl"] , ["@", "json", "", "json"] - , ["src/buildtool/build_engine/expression", "expression"] + , ["src/buildtool/common", "clidefaults"] , ["src/buildtool/common", "retry_cli"] + , ["src/buildtool/common", "user_structs"] , ["src/buildtool/crypto", "hash_function"] + , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/file_system", "git_context"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] @@ -25,6 +29,7 @@ , ["src/buildtool/storage", "config"] , ["src/buildtool/storage", "repository_garbage_collector"] , ["src/buildtool/storage", "storage"] + , ["src/utils/cpp", "expected"] ] , "stage": ["src", "other_tools", "just_mr"] , "private-ldflags": @@ -43,13 +48,14 @@ , "deps": [ ["@", "gsl", "", "gsl"] , ["@", "json", "", "json"] - , ["src/buildtool/build_engine/expression", "expression"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/storage", "config"] ] , "stage": ["src", "other_tools", "just_mr"] , "private-deps": - [ ["src/buildtool/logging", "log_level"] + [ ["src/buildtool/build_engine/expression", "expression"] + , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] ] } @@ -73,7 +79,6 @@ , ["src/buildtool/common", "clidefaults"] , ["src/buildtool/common", "retry_cli"] , ["src/buildtool/common", "user_structs"] - , ["src/buildtool/execution_api/local", "config"] , ["src/buildtool/logging", "log_level"] ] , "stage": ["src", "other_tools", "just_mr"] @@ -99,6 +104,7 @@ , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] + , ["src/utils/cpp", "expected"] ] } , "fetch": @@ -117,27 +123,31 @@ , "private-deps": [ "exit_codes" , "setup_utils" + , "utils" , ["@", "fmt", "", "fmt"] + , ["@", "gsl", "", "gsl"] , ["@", "json", "", "json"] - , ["src/buildtool/auth", "auth"] - , ["src/buildtool/common/remote", "retry_config"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] + , ["src/buildtool/common", "user_structs"] + , ["src/buildtool/common/remote", "remote_common"] , ["src/buildtool/crypto", "hash_function"] , ["src/buildtool/execution_api/bazel_msg", "bazel_msg"] , ["src/buildtool/execution_api/common", "api_bundle"] , ["src/buildtool/execution_api/common", "common"] - , ["src/buildtool/execution_api/local", "config"] , ["src/buildtool/execution_api/local", "context"] , ["src/buildtool/execution_api/local", "local"] , ["src/buildtool/execution_api/remote", "bazel"] , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/execution_api/remote", "context"] , ["src/buildtool/execution_api/serve", "mr_local_api"] + , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] , ["src/buildtool/main", "retry"] + , ["src/buildtool/multithreading", "async_map_consumer"] , ["src/buildtool/multithreading", "async_map_utils"] , ["src/buildtool/multithreading", "task_system"] - , ["src/buildtool/serve_api/remote", "config"] + , ["src/buildtool/progress_reporting", "base_progress_reporter"] , ["src/buildtool/serve_api/remote", "serve_api"] , ["src/other_tools/just_mr/progress_reporting", "progress"] , ["src/other_tools/just_mr/progress_reporting", "progress_reporter"] @@ -149,6 +159,7 @@ , ["src/other_tools/ops_maps", "import_to_git_map"] , ["src/other_tools/utils", "parse_archive"] , ["src/other_tools/utils", "parse_git_tree"] + , ["src/utils/cpp", "expected"] , ["src/utils/cpp", "file_locking"] ] } @@ -168,15 +179,18 @@ , "utils" , ["@", "fmt", "", "fmt"] , ["@", "json", "", "json"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] , ["src/buildtool/multithreading", "async_map_utils"] , ["src/buildtool/multithreading", "task_system"] + , ["src/buildtool/progress_reporting", "base_progress_reporter"] , ["src/other_tools/git_operations", "git_repo_remote"] , ["src/other_tools/just_mr/progress_reporting", "progress"] , ["src/other_tools/just_mr/progress_reporting", "progress_reporter"] , ["src/other_tools/just_mr/progress_reporting", "statistics"] , ["src/other_tools/ops_maps", "git_update_map"] + , ["src/utils/cpp", "tmp_dir"] ] } , "setup": @@ -193,30 +207,31 @@ ] , "stage": ["src", "other_tools", "just_mr"] , "private-deps": - [ "exit_codes" - , "setup_utils" + [ "setup_utils" , "utils" + , ["@", "gsl", "", "gsl"] , ["@", "json", "", "json"] - , ["src/buildtool/auth", "auth"] - , ["src/buildtool/common/remote", "retry_config"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] + , ["src/buildtool/common", "user_structs"] + , ["src/buildtool/common/remote", "remote_common"] , ["src/buildtool/crypto", "hash_function"] , ["src/buildtool/execution_api/bazel_msg", "bazel_msg"] , ["src/buildtool/execution_api/common", "api_bundle"] , ["src/buildtool/execution_api/common", "common"] - , ["src/buildtool/execution_api/local", "config"] , ["src/buildtool/execution_api/local", "context"] , ["src/buildtool/execution_api/local", "local"] , ["src/buildtool/execution_api/remote", "bazel"] , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/execution_api/remote", "context"] , ["src/buildtool/execution_api/serve", "mr_local_api"] + , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/file_system/symlinks_map", "resolve_symlinks_map"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] , ["src/buildtool/main", "retry"] , ["src/buildtool/multithreading", "async_map_utils"] , ["src/buildtool/multithreading", "task_system"] - , ["src/buildtool/serve_api/remote", "config"] + , ["src/buildtool/progress_reporting", "base_progress_reporter"] , ["src/buildtool/serve_api/remote", "serve_api"] , ["src/buildtool/storage", "fs_utils"] , ["src/other_tools/just_mr/progress_reporting", "progress"] @@ -225,12 +240,15 @@ , ["src/other_tools/ops_maps", "content_cas_map"] , ["src/other_tools/ops_maps", "critical_git_op_map"] , ["src/other_tools/ops_maps", "git_tree_fetch_map"] + , ["src/other_tools/ops_maps", "import_to_git_map"] , ["src/other_tools/repo_map", "repos_to_setup_map"] , ["src/other_tools/root_maps", "commit_git_map"] , ["src/other_tools/root_maps", "content_git_map"] , ["src/other_tools/root_maps", "distdir_git_map"] + , ["src/other_tools/root_maps", "foreign_file_git_map"] , ["src/other_tools/root_maps", "fpath_git_map"] , ["src/other_tools/root_maps", "tree_id_git_map"] + , ["src/utils/cpp", "expected"] , ["src/utils/cpp", "file_locking"] ] } @@ -250,11 +268,14 @@ [ "exit_codes" , "setup" , "setup_utils" + , "utils" , ["@", "json", "", "json"] , ["src/buildtool/build_engine/expression", "expression"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] + , ["src/buildtool/common", "clidefaults"] + , ["src/buildtool/common", "user_structs"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] - , ["src/buildtool/multithreading", "task_system"] , ["src/buildtool/storage", "repository_garbage_collector"] , ["src/utils/cpp", "file_locking"] ] @@ -280,13 +301,18 @@ , "private-deps": [ "exit_codes" , "rc_merge" + , "utils" , ["@", "json", "", "json"] , ["src/buildtool/build_engine/expression", "expression"] , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] + , ["src/buildtool/common", "clidefaults"] , ["src/buildtool/common", "location"] + , ["src/buildtool/common", "retry_cli"] + , ["src/buildtool/common", "user_structs"] , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] + , ["src/utils/cpp", "expected"] ] , "stage": ["src", "other_tools", "just_mr"] } @@ -296,6 +322,9 @@ , "hdrs": ["rc_merge.hpp"] , "srcs": ["rc_merge.cpp"] , "stage": ["src", "other_tools", "just_mr"] - , "deps": [["src/buildtool/build_engine/expression", "expression"]] + , "deps": + [ ["src/buildtool/build_engine/expression", "expression"] + , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] + ] } } diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index 7652ce32..0c3e63a9 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -15,9 +15,12 @@ #ifndef INCLUDED_SRC_OTHER_TOOLS_JUST_MR_CLI_HPP #define INCLUDED_SRC_OTHER_TOOLS_JUST_MR_CLI_HPP +#include <algorithm> #include <cstddef> #include <cstdint> #include <filesystem> +#include <functional> +#include <memory> #include <optional> #include <string> #include <thread> @@ -32,7 +35,6 @@ #include "src/buildtool/common/clidefaults.hpp" #include "src/buildtool/common/retry_cli.hpp" #include "src/buildtool/common/user_structs.hpp" -#include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/other_tools/just_mr/mirrors.hpp" #include "src/other_tools/just_mr/utils.hpp" diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 99f21eb1..adae801f 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -14,31 +14,43 @@ #include "src/other_tools/just_mr/fetch.hpp" +#include <algorithm> +#include <atomic> +#include <compare> +#include <condition_variable> #include <filesystem> +#include <functional> #include <optional> +#include <thread> +#include <unordered_map> #include <utility> // std::move +#include <vector> #include "fmt/core.h" +#include "gsl/gsl" #include "nlohmann/json.hpp" -#include "src/buildtool/auth/authentication.hpp" -#include "src/buildtool/common/remote/retry_config.hpp" +#include "src/buildtool/build_engine/expression/expression.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/common/remote/remote_common.hpp" +#include "src/buildtool/common/user_structs.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_common.hpp" #include "src/buildtool/execution_api/common/api_bundle.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" -#include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/execution_api/local/context.hpp" #include "src/buildtool/execution_api/local/local_api.hpp" #include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/execution_api/remote/context.hpp" #include "src/buildtool/execution_api/serve/mr_local_api.hpp" +#include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/main/retry.hpp" +#include "src/buildtool/multithreading/async_map_consumer.hpp" #include "src/buildtool/multithreading/async_map_utils.hpp" #include "src/buildtool/multithreading/task_system.hpp" -#include "src/buildtool/serve_api/remote/config.hpp" +#include "src/buildtool/progress_reporting/base_progress_reporter.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" #include "src/buildtool/storage/garbage_collector.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" @@ -46,6 +58,7 @@ #include "src/other_tools/just_mr/progress_reporting/progress_reporter.hpp" #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/other_tools/just_mr/setup_utils.hpp" +#include "src/other_tools/just_mr/utils.hpp" #include "src/other_tools/ops_maps/archive_fetch_map.hpp" #include "src/other_tools/ops_maps/content_cas_map.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" @@ -53,6 +66,7 @@ #include "src/other_tools/ops_maps/import_to_git_map.hpp" #include "src/other_tools/utils/parse_archive.hpp" #include "src/other_tools/utils/parse_git_tree.hpp" +#include "src/utils/cpp/expected.hpp" #include "src/utils/cpp/file_locking.hpp" auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index 8430713c..7714711b 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -14,23 +14,41 @@ #include "src/other_tools/just_mr/launch.hpp" -#include <cerrno> // for errno +#ifdef __unix__ +#include <unistd.h> +#else +#error "Non-unix is not supported yet" +#endif + +#include <algorithm> +#include <cerrno> // for errno +#include <cstdlib> #include <cstring> // for strerror() +#include <exception> #include <filesystem> -#include <utility> +#include <functional> +#include <iterator> +#include <map> +#include <memory> +#include <type_traits> +#include <unordered_map> +#include <vector> #include "nlohmann/json.hpp" #include "src/buildtool/build_engine/expression/configuration.hpp" #include "src/buildtool/build_engine/expression/expression.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/common/clidefaults.hpp" +#include "src/buildtool/common/user_structs.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" -#include "src/buildtool/multithreading/task_system.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/garbage_collector.hpp" #include "src/buildtool/storage/repository_garbage_collector.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/setup.hpp" #include "src/other_tools/just_mr/setup_utils.hpp" +#include "src/other_tools/just_mr/utils.hpp" #include "src/utils/cpp/file_locking.hpp" auto CallJust(std::optional<std::filesystem::path> const& config_file, diff --git a/src/other_tools/just_mr/launch.hpp b/src/other_tools/just_mr/launch.hpp index 69c1603a..14eb0aea 100644 --- a/src/other_tools/just_mr/launch.hpp +++ b/src/other_tools/just_mr/launch.hpp @@ -17,6 +17,7 @@ #include <filesystem> #include <optional> +#include <string> #include "src/buildtool/common/retry_cli.hpp" #include "src/buildtool/storage/config.hpp" diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index e4eaa18c..28d4669f 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -12,22 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include <cstdlib> #include <exception> #include <filesystem> +#include <fstream> +#include <iostream> +#include <map> +#include <memory> +#include <optional> +#include <string> #include <utility> - -#ifdef __unix__ -#include <unistd.h> -#else -#error "Non-unix is not supported yet" -#endif +#include <vector> #include "CLI/CLI.hpp" #include "gsl/gsl" #include "nlohmann/json.hpp" -#include "src/buildtool/build_engine/expression/configuration.hpp" +#include "src/buildtool/common/clidefaults.hpp" #include "src/buildtool/common/retry_cli.hpp" +#include "src/buildtool/common/user_structs.hpp" #include "src/buildtool/crypto/hash_function.hpp" +#include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/git_context.hpp" #include "src/buildtool/logging/log_config.hpp" #include "src/buildtool/logging/log_level.hpp" @@ -38,14 +42,18 @@ #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/garbage_collector.hpp" #include "src/buildtool/storage/repository_garbage_collector.hpp" +#include "src/buildtool/storage/storage.hpp" #include "src/other_tools/just_mr/cli.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/fetch.hpp" #include "src/other_tools/just_mr/launch.hpp" +#include "src/other_tools/just_mr/mirrors.hpp" #include "src/other_tools/just_mr/rc.hpp" #include "src/other_tools/just_mr/setup.hpp" #include "src/other_tools/just_mr/setup_utils.hpp" #include "src/other_tools/just_mr/update.hpp" +#include "src/other_tools/just_mr/utils.hpp" +#include "src/utils/cpp/expected.hpp" namespace { diff --git a/src/other_tools/just_mr/mirrors.hpp b/src/other_tools/just_mr/mirrors.hpp index 2e512e8c..47fc98be 100644 --- a/src/other_tools/just_mr/mirrors.hpp +++ b/src/other_tools/just_mr/mirrors.hpp @@ -15,10 +15,15 @@ #ifndef INCLUDED_SRC_OTHER_TOOLS_JUST_MR_MIRRORS_HPP #define INCLUDED_SRC_OTHER_TOOLS_JUST_MR_MIRRORS_HPP +#include <algorithm> #include <exception> +#include <functional> +#include <iterator> #include <memory> +#include <optional> #include <string> #include <unordered_map> +#include <utility> #include <vector> #include "nlohmann/json.hpp" diff --git a/src/other_tools/just_mr/progress_reporting/TARGETS b/src/other_tools/just_mr/progress_reporting/TARGETS index e1e42016..92c2bf06 100644 --- a/src/other_tools/just_mr/progress_reporting/TARGETS +++ b/src/other_tools/just_mr/progress_reporting/TARGETS @@ -28,6 +28,7 @@ , ["@", "json", "", "json"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] + , ["src/buildtool/progress_reporting", "task_tracker"] ] } } diff --git a/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp b/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp index c0e5c78f..2ad17376 100644 --- a/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp +++ b/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp @@ -14,12 +14,14 @@ #include "src/other_tools/just_mr/progress_reporting/progress_reporter.hpp" -#include <cstddef> +#include <functional> +#include <string> #include "fmt/core.h" #include "nlohmann/json.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" +#include "src/buildtool/progress_reporting/task_tracker.hpp" auto JustMRProgressReporter::Reporter( gsl::not_null<JustMRStatistics*> const& stats, diff --git a/src/other_tools/just_mr/rc.cpp b/src/other_tools/just_mr/rc.cpp index 0a5a171a..0359253c 100644 --- a/src/other_tools/just_mr/rc.cpp +++ b/src/other_tools/just_mr/rc.cpp @@ -14,18 +14,32 @@ #include "src/other_tools/just_mr/rc.hpp" +#include <cmath> +#include <cstdlib> +#include <exception> +#include <fstream> +#include <functional> +#include <memory> +#include <string> +#include <unordered_map> #include <utility> // std::move +#include <vector> #include "nlohmann/json.hpp" #include "src/buildtool/build_engine/expression/configuration.hpp" +#include "src/buildtool/build_engine/expression/expression.hpp" #include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/common/clidefaults.hpp" #include "src/buildtool/common/location.hpp" +#include "src/buildtool/common/retry_cli.hpp" +#include "src/buildtool/common/user_structs.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/log_level.hpp" -#include "src/buildtool/logging/log_sink_file.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/rc_merge.hpp" +#include "src/other_tools/just_mr/utils.hpp" +#include "src/utils/cpp/expected.hpp" namespace { diff --git a/src/other_tools/just_mr/rc_merge.cpp b/src/other_tools/just_mr/rc_merge.cpp index 674254cf..dfd90b54 100644 --- a/src/other_tools/just_mr/rc_merge.cpp +++ b/src/other_tools/just_mr/rc_merge.cpp @@ -15,10 +15,12 @@ #include "src/other_tools/just_mr/rc_merge.hpp" #include <algorithm> +#include <iterator> #include <string> #include <vector> #include "src/buildtool/build_engine/expression/expression.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" namespace { diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp index 4ab032de..229d162f 100644 --- a/src/other_tools/just_mr/setup.cpp +++ b/src/other_tools/just_mr/setup.cpp @@ -14,38 +14,45 @@ #include "src/other_tools/just_mr/setup.hpp" +#include <algorithm> #include <atomic> +#include <compare> #include <condition_variable> #include <cstddef> #include <exception> +#include <functional> #include <optional> #include <thread> +#include <utility> +#include <vector> +#include "gsl/gsl" #include "nlohmann/json.hpp" -#include "src/buildtool/auth/authentication.hpp" -#include "src/buildtool/common/remote/retry_config.hpp" +#include "src/buildtool/build_engine/expression/expression.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/common/remote/remote_common.hpp" +#include "src/buildtool/common/user_structs.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_common.hpp" #include "src/buildtool/execution_api/common/api_bundle.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" -#include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/execution_api/local/context.hpp" #include "src/buildtool/execution_api/local/local_api.hpp" #include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/execution_api/remote/context.hpp" #include "src/buildtool/execution_api/serve/mr_local_api.hpp" +#include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/main/retry.hpp" #include "src/buildtool/multithreading/async_map_utils.hpp" #include "src/buildtool/multithreading/task_system.hpp" -#include "src/buildtool/serve_api/remote/config.hpp" +#include "src/buildtool/progress_reporting/base_progress_reporter.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" #include "src/buildtool/storage/fs_utils.hpp" #include "src/buildtool/storage/garbage_collector.hpp" -#include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" #include "src/other_tools/just_mr/progress_reporting/progress_reporter.hpp" #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" @@ -54,12 +61,15 @@ #include "src/other_tools/ops_maps/content_cas_map.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" #include "src/other_tools/ops_maps/git_tree_fetch_map.hpp" +#include "src/other_tools/ops_maps/import_to_git_map.hpp" #include "src/other_tools/repo_map/repos_to_setup_map.hpp" #include "src/other_tools/root_maps/commit_git_map.hpp" #include "src/other_tools/root_maps/content_git_map.hpp" #include "src/other_tools/root_maps/distdir_git_map.hpp" +#include "src/other_tools/root_maps/foreign_file_git_map.hpp" #include "src/other_tools/root_maps/fpath_git_map.hpp" #include "src/other_tools/root_maps/tree_id_git_map.hpp" +#include "src/utils/cpp/expected.hpp" #include "src/utils/cpp/file_locking.hpp" auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, diff --git a/src/other_tools/just_mr/setup_utils.cpp b/src/other_tools/just_mr/setup_utils.cpp index 777343f5..d7dc6e5d 100644 --- a/src/other_tools/just_mr/setup_utils.cpp +++ b/src/other_tools/just_mr/setup_utils.cpp @@ -15,8 +15,12 @@ #include "src/other_tools/just_mr/setup_utils.hpp" #include <algorithm> +#include <cstdlib> +#include <exception> #include <fstream> +#include <iterator> #include <unordered_set> +#include <utility> #include <variant> #include "nlohmann/json.hpp" @@ -26,6 +30,7 @@ #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" +#include "src/utils/cpp/expected.hpp" namespace { diff --git a/src/other_tools/just_mr/setup_utils.hpp b/src/other_tools/just_mr/setup_utils.hpp index c96db5a3..6b0d8731 100644 --- a/src/other_tools/just_mr/setup_utils.hpp +++ b/src/other_tools/just_mr/setup_utils.hpp @@ -16,10 +16,11 @@ #define INCLUDED_SRC_OTHER_TOOLS_JUST_MR_SETUP_UTILS_HPP #include <filesystem> +#include <functional> #include <memory> #include <optional> -#include <set> #include <string> +#include <unordered_set> #include <vector> #include "src/buildtool/auth/authentication.hpp" diff --git a/src/other_tools/just_mr/update.cpp b/src/other_tools/just_mr/update.cpp index 819ccf64..93a84bcd 100644 --- a/src/other_tools/just_mr/update.cpp +++ b/src/other_tools/just_mr/update.cpp @@ -19,14 +19,22 @@ #include <cstddef> #include <exception> #include <filesystem> +#include <functional> +#include <iostream> +#include <optional> #include <thread> +#include <unordered_map> +#include <vector> #include "fmt/core.h" #include "nlohmann/json.hpp" +#include "src/buildtool/build_engine/expression/expression.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/multithreading/async_map_utils.hpp" #include "src/buildtool/multithreading/task_system.hpp" +#include "src/buildtool/progress_reporting/base_progress_reporter.hpp" #include "src/other_tools/git_operations/git_repo_remote.hpp" #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" @@ -34,6 +42,7 @@ #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/other_tools/just_mr/utils.hpp" #include "src/other_tools/ops_maps/git_update_map.hpp" +#include "src/utils/cpp/tmp_dir.hpp" auto MultiRepoUpdate(std::shared_ptr<Configuration> const& config, MultiRepoCommonArguments const& common_args, diff --git a/src/other_tools/just_mr/update.hpp b/src/other_tools/just_mr/update.hpp index 3cc4ca11..f0e34e69 100644 --- a/src/other_tools/just_mr/update.hpp +++ b/src/other_tools/just_mr/update.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_OTHER_TOOLS_JUST_MR_UPDATE_HPP #include <memory> +#include <string> #include "src/buildtool/build_engine/expression/configuration.hpp" #include "src/buildtool/storage/config.hpp" diff --git a/src/other_tools/just_mr/utils.cpp b/src/other_tools/just_mr/utils.cpp index e49da9d8..5d7e1912 100644 --- a/src/other_tools/just_mr/utils.cpp +++ b/src/other_tools/just_mr/utils.cpp @@ -14,6 +14,9 @@ #include "src/other_tools/just_mr/utils.hpp" +#include <exception> + +#include "src/buildtool/build_engine/expression/expression.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" diff --git a/src/other_tools/just_mr/utils.hpp b/src/other_tools/just_mr/utils.hpp index 16f86614..9b31d888 100644 --- a/src/other_tools/just_mr/utils.hpp +++ b/src/other_tools/just_mr/utils.hpp @@ -15,16 +15,20 @@ #ifndef INCLUDED_SRC_OTHER_TOOLS_JUST_MR_UTILS_HPP #define INCLUDED_SRC_OTHER_TOOLS_JUST_MR_UTILS_HPP +#include <cstdint> +#include <filesystem> +#include <functional> #include <map> #include <optional> #include <string> #include <unordered_map> #include <unordered_set> +#include <utility> #include <vector> #include "gsl/gsl" #include "nlohmann/json.hpp" -#include "src/buildtool/build_engine/expression/configuration.hpp" +#include "src/buildtool/build_engine/expression/expression_ptr.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/storage/config.hpp" |