Skip to content

Commit

Permalink
More include (only) what you use changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jemoreira committed Jun 11, 2024
1 parent 30ed446 commit 64b4af8
Show file tree
Hide file tree
Showing 36 changed files with 96 additions and 2,017 deletions.
1,989 changes: 89 additions & 1,900 deletions base/cvd/MODULE.bazel.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions base/cvd/cuttlefish/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ cc_library(
"host/commands/cvd/server_command/status.h",
"host/commands/cvd/server_command/status_fetcher.cpp",
"host/commands/cvd/server_command/status_fetcher.h",
"host/commands/cvd/server_command/subcmd.h",
"host/commands/cvd/server_command/subprocess_waiter.cpp",
"host/commands/cvd/server_command/subprocess_waiter.h",
"host/commands/cvd/server_command/try_acloud.cpp",
Expand Down Expand Up @@ -438,7 +437,6 @@ cc_library(
"host/commands/cvd/server_command/start_impl.h",
"host/commands/cvd/server_command/status.h",
"host/commands/cvd/server_command/status_fetcher.h",
"host/commands/cvd/server_command/subcmd.h",
"host/commands/cvd/server_command/subprocess_waiter.h",
"host/commands/cvd/server_command/try_acloud.h",
"host/commands/cvd/server_command/utils.h",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,19 @@

#include "host/commands/cvd/server_command/acloud_command.h"

#include <atomic>
#include <mutex>
#include <thread>

#include <android-base/file.h>
#include <android-base/strings.h>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/environment.h"
#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/acloud/converter.h"
#include "host/commands/cvd/acloud/create_converter_parser.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/instance_lock.h"
#include "host/commands/cvd/server_command/acloud_common.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#include <filesystem>
#include <fstream>
#include <iostream>

#include <android-base/file.h>

Expand All @@ -28,6 +26,7 @@
#include "host/commands/cvd/server_client.h"
#include "host/commands/cvd/server_command/acloud_mixsuperimage.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/subprocess_waiter.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "host/libs/config/config_utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

#include <memory>

#include "host/commands/cvd/server_command/acloud_common.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/subprocess_waiter.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#include "host/commands/cvd/server_command/acloud_translator.h"

#include <mutex>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/flag_parser.h"
#include "common/libs/utils/result.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@

#pragma once

#include <atomic>
#include <memory>

#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/acloud_common.h"
#include "host/commands/cvd/server_command/server_handler.h"

namespace cuttlefish {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "host/commands/cvd/server_command/cmd_list.h"

#include <mutex>
#include <vector>

#include <android-base/strings.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include <android-base/strings.h>

#include <iostream>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
Expand Down
6 changes: 0 additions & 6 deletions base/cvd/cuttlefish/host/commands/cvd/server_command/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,14 @@

#include <android-base/strings.h>

#include <iostream>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
#include <vector>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/subprocess.h"
#include "host/commands/cvd/flag.h"
#include "host/commands/cvd/selector/instance_group_record.h"
#include "host/commands/cvd/selector/instance_record.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <android-base/strings.h>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/result.h"
Expand Down
2 changes: 0 additions & 2 deletions base/cvd/cuttlefish/host/commands/cvd/server_command/fetch.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#pragma once

#include <memory>
#include <mutex>

#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/subprocess_waiter.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,16 @@

#include <sys/types.h>

#include <mutex>

#include <android-base/file.h>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/files.h"
#include "common/libs/utils/json.h"
#include "common/libs/utils/result.h"
#include "host/commands/cvd/selector/instance_database_types.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_client.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/status_fetcher.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "host/libs/config/config_constants.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/host_tool_target_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/subprocess_waiter.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <sys/types.h>

#include <functional>
#include <mutex>

#include <android-base/file.h>
#include <android-base/parseint.h>
Expand All @@ -28,12 +27,10 @@
#include "common/libs/fs/shared_buf.h"
#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/environment.h"
#include "common/libs/utils/files.h"
#include "common/libs/utils/result.h"
#include "common/libs/utils/subprocess.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/interruptible_terminal.h"
Expand All @@ -43,7 +40,6 @@
#include "host/commands/cvd/server_command/subprocess_waiter.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "host/libs/config/instance_nums.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "host/commands/cvd/server_command/handler_proxy.h"

#include <mutex>
#include <vector>

#include <android-base/strings.h>
Expand Down
3 changes: 0 additions & 3 deletions base/cvd/cuttlefish/host/commands/cvd/server_command/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@
#include <fcntl.h>

#include <memory>
#include <mutex>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>

#include <android-base/strings.h>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/request_context.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <string>
#include <unordered_map>
#include <vector>

#include "common/libs/utils/result.h"
#include "host/commands/cvd/server_command/flags_collector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include "host/commands/cvd/server_command/host_tool_target_manager.h"

#include <memory>
#include <mutex>

#include "common/libs/utils/contains.h"
#include "common/libs/utils/files.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/server_command/host_tool_target.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@

#pragma once

#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>

#include "common/libs/utils/result.h"
#include "host/commands/cvd/server_command/flags_collector.h"
#include "host/commands/cvd/server_command/host_tool_target.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,14 @@

#include "host/commands/cvd/server_command/lint.h"

#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>

#include "json/json.h"

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/result.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/parser/load_configs_parser.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_client.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
Expand All @@ -55,7 +48,7 @@ class LintCommandHandler : public CvdServerHandler {
public:
LintCommandHandler() {}

Result<bool> CanHandle(const RequestWithStdio& request) const {
Result<bool> CanHandle(const RequestWithStdio& request) const override {
auto invocation = ParseInvocation(request.Message());
return invocation.command == kLintSubCmd;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,14 @@
*/
#include "host/commands/cvd/server_command/load_configs.h"

#include <iostream>
#include <mutex>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>

#include "json/json.h"

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/contains.h"
#include "common/libs/utils/result.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/parser/load_configs_parser.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_client.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
#include <android-base/strings.h>

#include <functional>
#include <iostream>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
#include <vector>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/contains.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#include "host/commands/cvd/server_command/reset.h"

#include <iostream>
#include <sstream>

#include "common/libs/fs/shared_buf.h"
#include "common/libs/utils/files.h"
#include "common/libs/utils/flag_parser.h"
#include "host/commands/cvd/instance_manager.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <sys/types.h>

#include <chrono>
#include <mutex>
#include <sstream>
#include <string>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
#include "host/commands/cvd/server_command/serial_preset.h"

#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include <android-base/file.h>
#include <android-base/strings.h>

#include <iostream>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
#include <vector>
Expand All @@ -30,10 +27,7 @@
#include "common/libs/utils/contains.h"
#include "common/libs/utils/subprocess.h"
#include "host/commands/cvd/flag.h"
#include "host/commands/cvd/selector/instance_database_types.h"
#include "host/commands/cvd/selector/instance_group_record.h"
#include "host/commands/cvd/selector/instance_record.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_command/host_tool_target_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
#include <algorithm>
#include <array>
#include <atomic>
#include <cstdint>
#include <cstdlib>
#include <iostream>
#include <mutex>
#include <optional>
#include <regex>
#include <sstream>
#include <string>

Expand Down
Loading

0 comments on commit 64b4af8

Please sign in to comment.