summaryrefslogtreecommitdiff
path: root/src/other_tools/utils
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-11-14 09:50:29 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2024-11-14 14:23:06 +0100
commit9dd98e0a3d34318f912b240f38f4c7e9181595b5 (patch)
treeb9fb351b03acfd9f34b9f94246dee497eff677ac /src/other_tools/utils
parenta86df51d15da0c55ff7aded9f05d2c23d828eda8 (diff)
downloadjustbuild-9dd98e0a3d34318f912b240f38f4c7e9181595b5.tar.gz
other_tools/utils: Implement IWYU suggestions
Diffstat (limited to 'src/other_tools/utils')
-rw-r--r--src/other_tools/utils/TARGETS29
-rw-r--r--src/other_tools/utils/content.hpp4
-rw-r--r--src/other_tools/utils/curl_easy_handle.cpp3
-rw-r--r--src/other_tools/utils/curl_easy_handle.hpp3
-rw-r--r--src/other_tools/utils/curl_url_handle.cpp2
-rw-r--r--src/other_tools/utils/curl_url_handle.hpp2
-rw-r--r--src/other_tools/utils/parse_archive.cpp8
-rw-r--r--src/other_tools/utils/parse_archive.hpp3
-rw-r--r--src/other_tools/utils/parse_git_tree.cpp4
-rw-r--r--src/other_tools/utils/parse_git_tree.hpp2
10 files changed, 47 insertions, 13 deletions
diff --git a/src/other_tools/utils/TARGETS b/src/other_tools/utils/TARGETS
index 4d44c9e5..d568b7e4 100644
--- a/src/other_tools/utils/TARGETS
+++ b/src/other_tools/utils/TARGETS
@@ -15,10 +15,14 @@
, "name": ["curl_easy_handle"]
, "hdrs": ["curl_easy_handle.hpp"]
, "srcs": ["curl_easy_handle.cpp"]
- , "deps": ["curl_context", ["src/buildtool/logging", "log_level"]]
+ , "deps":
+ [ "curl_context"
+ , ["@", "gsl", "", "gsl"]
+ , ["src/buildtool/logging", "log_level"]
+ ]
, "stage": ["src", "other_tools", "utils"]
, "private-deps":
- [ ["@", "gsl", "", "gsl"]
+ [ ["@", "fmt", "", "fmt"]
, ["", "libcurl"]
, ["src/buildtool/file_system", "file_system_manager"]
, ["src/buildtool/logging", "logging"]
@@ -43,7 +47,7 @@
, "hdrs": ["content.hpp"]
, "deps":
[ "curl_easy_handle"
- , "curl_url_handle"
+ , ["@", "fmt", "", "fmt"]
, ["src/buildtool/common", "user_structs"]
, ["src/buildtool/crypto", "hasher"]
, ["src/buildtool/logging", "log_level"]
@@ -58,12 +62,18 @@
, "hdrs": ["parse_archive.hpp"]
, "srcs": ["parse_archive.cpp"]
, "deps":
- [ ["src/buildtool/build_engine/expression", "expression"]
+ [ ["src/buildtool/build_engine/expression", "expression_ptr_interface"]
+ , ["src/buildtool/multithreading", "async_map_consumer"]
, ["src/other_tools/ops_maps", "content_cas_map"]
, ["src/utils/cpp", "expected"]
]
, "private-deps":
- [["@", "fmt", "", "fmt"], ["src/buildtool/crypto", "hash_info"]]
+ [ ["@", "fmt", "", "fmt"]
+ , ["src/buildtool/build_engine/expression", "expression"]
+ , ["src/buildtool/crypto", "hash_function"]
+ , ["src/buildtool/crypto", "hash_info"]
+ , ["src/buildtool/file_system/symlinks_map", "pragma_special"]
+ ]
, "stage": ["src", "other_tools", "utils"]
}
, "parse_git_tree":
@@ -72,12 +82,17 @@
, "hdrs": ["parse_git_tree.hpp"]
, "srcs": ["parse_git_tree.cpp"]
, "deps":
- [ ["src/buildtool/build_engine/expression", "expression"]
+ [ ["src/buildtool/build_engine/expression", "expression_ptr_interface"]
, ["src/other_tools/ops_maps", "git_tree_fetch_map"]
, ["src/utils/cpp", "expected"]
]
, "private-deps":
- [["@", "fmt", "", "fmt"], ["src/buildtool/crypto", "hash_info"]]
+ [ ["@", "fmt", "", "fmt"]
+ , ["@", "json", "", "json"]
+ , ["src/buildtool/build_engine/expression", "expression"]
+ , ["src/buildtool/crypto", "hash_function"]
+ , ["src/buildtool/crypto", "hash_info"]
+ ]
, "stage": ["src", "other_tools", "utils"]
}
}
diff --git a/src/other_tools/utils/content.hpp b/src/other_tools/utils/content.hpp
index 15268daf..a644f5bd 100644
--- a/src/other_tools/utils/content.hpp
+++ b/src/other_tools/utils/content.hpp
@@ -15,16 +15,18 @@
#ifndef INCLUDED_SRC_OTHER_TOOLS_UTILS_CONTENT_HPP
#define INCLUDED_SRC_OTHER_TOOLS_UTILS_CONTENT_HPP
+#include <memory>
#include <optional>
#include <string>
#include <utility> // std::move
+#include <vector>
+#include "fmt/core.h"
#include "src/buildtool/common/user_structs.hpp"
#include "src/buildtool/crypto/hasher.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/other_tools/just_mr/mirrors.hpp"
#include "src/other_tools/utils/curl_easy_handle.hpp"
-#include "src/other_tools/utils/curl_url_handle.hpp"
#include "src/utils/cpp/expected.hpp"
// Utilities related to the content of an archive
diff --git a/src/other_tools/utils/curl_easy_handle.cpp b/src/other_tools/utils/curl_easy_handle.cpp
index 43bdfced..844e478e 100644
--- a/src/other_tools/utils/curl_easy_handle.cpp
+++ b/src/other_tools/utils/curl_easy_handle.cpp
@@ -15,9 +15,10 @@
#include "src/other_tools/utils/curl_easy_handle.hpp"
#include <cstdio>
+#include <exception>
#include <fstream>
-#include "gsl/gsl"
+#include "fmt/core.h"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/buildtool/logging/logger.hpp"
diff --git a/src/other_tools/utils/curl_easy_handle.hpp b/src/other_tools/utils/curl_easy_handle.hpp
index a3dd6e06..6e600209 100644
--- a/src/other_tools/utils/curl_easy_handle.hpp
+++ b/src/other_tools/utils/curl_easy_handle.hpp
@@ -17,11 +17,12 @@
#include <cstddef>
#include <filesystem>
-#include <functional>
+#include <iosfwd>
#include <memory>
#include <optional>
#include <string>
+#include "gsl/gsl"
#include "src/buildtool/logging/log_level.hpp"
#include "src/other_tools/utils/curl_context.hpp"
diff --git a/src/other_tools/utils/curl_url_handle.cpp b/src/other_tools/utils/curl_url_handle.cpp
index 142d1809..93fdc695 100644
--- a/src/other_tools/utils/curl_url_handle.cpp
+++ b/src/other_tools/utils/curl_url_handle.cpp
@@ -14,7 +14,9 @@
#include "src/other_tools/utils/curl_url_handle.hpp"
+#include <algorithm>
#include <cstddef>
+#include <exception>
#include <regex>
#include <sstream>
diff --git a/src/other_tools/utils/curl_url_handle.hpp b/src/other_tools/utils/curl_url_handle.hpp
index 6a7a7917..12fd26af 100644
--- a/src/other_tools/utils/curl_url_handle.hpp
+++ b/src/other_tools/utils/curl_url_handle.hpp
@@ -17,9 +17,9 @@
#include <cstddef>
#include <filesystem>
-#include <functional>
#include <memory>
#include <optional>
+#include <string>
#include <vector>
#include "gsl/gsl"
diff --git a/src/other_tools/utils/parse_archive.cpp b/src/other_tools/utils/parse_archive.cpp
index fb03309a..b07bc425 100644
--- a/src/other_tools/utils/parse_archive.cpp
+++ b/src/other_tools/utils/parse_archive.cpp
@@ -14,10 +14,18 @@
#include "src/other_tools/utils/parse_archive.hpp"
+#include <filesystem>
+#include <functional>
+#include <memory>
+#include <unordered_map>
#include <utility> // std::move
+#include <vector>
#include "fmt/core.h"
+#include "src/buildtool/build_engine/expression/expression.hpp"
+#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/crypto/hash_info.hpp"
+#include "src/buildtool/file_system/symlinks_map/pragma_special.hpp"
auto ParseArchiveContent(ExpressionPtr const& repo_desc,
std::string const& origin)
diff --git a/src/other_tools/utils/parse_archive.hpp b/src/other_tools/utils/parse_archive.hpp
index 198bfa48..7c7c5419 100644
--- a/src/other_tools/utils/parse_archive.hpp
+++ b/src/other_tools/utils/parse_archive.hpp
@@ -18,7 +18,8 @@
#include <optional>
#include <string>
-#include "src/buildtool/build_engine/expression/expression.hpp"
+#include "src/buildtool/build_engine/expression/expression_ptr.hpp"
+#include "src/buildtool/multithreading/async_map_consumer.hpp"
#include "src/other_tools/ops_maps/content_cas_map.hpp"
#include "src/utils/cpp/expected.hpp"
diff --git a/src/other_tools/utils/parse_git_tree.cpp b/src/other_tools/utils/parse_git_tree.cpp
index 0e58676d..c14f4c55 100644
--- a/src/other_tools/utils/parse_git_tree.cpp
+++ b/src/other_tools/utils/parse_git_tree.cpp
@@ -14,11 +14,15 @@
#include "src/other_tools/utils/parse_git_tree.hpp"
+#include <functional>
#include <map>
#include <utility> // std::move
#include <vector>
#include "fmt/core.h"
+#include "nlohmann/json.hpp"
+#include "src/buildtool/build_engine/expression/expression.hpp"
+#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/crypto/hash_info.hpp"
[[nodiscard]] auto ParseGitTree(ExpressionPtr const& repo_desc,
diff --git a/src/other_tools/utils/parse_git_tree.hpp b/src/other_tools/utils/parse_git_tree.hpp
index 5aab1a5b..233e0a7d 100644
--- a/src/other_tools/utils/parse_git_tree.hpp
+++ b/src/other_tools/utils/parse_git_tree.hpp
@@ -18,7 +18,7 @@
#include <optional>
#include <string>
-#include "src/buildtool/build_engine/expression/expression.hpp"
+#include "src/buildtool/build_engine/expression/expression_ptr.hpp"
#include "src/other_tools/ops_maps/git_tree_fetch_map.hpp"
#include "src/utils/cpp/expected.hpp"