Skip to content

Commit

Permalink
fix(IWYU): fix the suggestions reported by IWYU while rebase merging …
Browse files Browse the repository at this point in the history
…branch migrate-metrics-dev into master such as including absl/strings/string_view.h
  • Loading branch information
empiredan committed Dec 11, 2023
1 parent db8e780 commit fa82854
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 36 deletions.
1 change: 0 additions & 1 deletion src/block_service/hdfs/hdfs_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <rocksdb/env.h>
#include <algorithm>
#include <type_traits>
#include <fstream>
#include <utility>

#include "hdfs/hdfs.h"
Expand Down
6 changes: 2 additions & 4 deletions src/common/fs_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,22 @@

#include "fs_manager.h"

#include <fmt/std.h> // IWYU pragma: keep
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <utility>

#include <fmt/std.h> // IWYU pragma: keep

#include "absl/strings/string_view.h"
#include "common/gpid.h"
#include "common/replication_enums.h"
#include "fmt/core.h"
#include "fmt/ostream.h"
#include "replica_admin_types.h"
#include "runtime/api_layer1.h"
#include "utils/fail_point.h"
#include "utils/filesystem.h"
#include "utils/fmt_logging.h"
#include "utils/ports.h"
#include "absl/strings/string_view.h"

METRIC_DEFINE_entity(disk);

Expand Down
1 change: 1 addition & 0 deletions src/failure_detector/failure_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <type_traits>
#include <utility>

#include "absl/strings/string_view.h"
#include "failure_detector/fd.code.definition.h"
#include "fd_types.h"
#include "runtime/api_layer1.h"
Expand Down
1 change: 1 addition & 0 deletions src/meta/meta_backup_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#include <absl/strings/string_view.h>
#include <boost/cstdint.hpp>
#include <boost/lexical_cast.hpp>
#include <fmt/core.h>
Expand Down
1 change: 1 addition & 0 deletions src/meta/meta_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* THE SOFTWARE.
*/

#include <absl/strings/string_view.h>
// IWYU pragma: no_include <boost/detail/basic_pointerbuf.hpp>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <boost/lexical_cast.hpp>
Expand Down
3 changes: 1 addition & 2 deletions src/meta/table_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@

#include "table_metrics.h"

#include <absl/strings/string_view.h>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <stddef.h>
#include <iosfwd>
#include <string>

#include "utils/fmt_logging.h"
Expand Down
1 change: 1 addition & 0 deletions src/nfs/nfs_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <mutex>

#include "absl/strings/string_view.h"
#include "nfs/nfs_code_definition.h"
#include "nfs/nfs_node.h"
#include "utils/blob.h"
Expand Down
3 changes: 2 additions & 1 deletion src/nfs/nfs_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
#include <type_traits>
#include <vector>

#include "absl/strings/string_view.h"
#include "nfs/nfs_code_definition.h"
#include "runtime/api_layer1.h"
#include "runtime/task/async_calls.h"
#include "utils/TokenBucket.h"
#include "utils/env.h"
#include "utils/autoref_ptr.h"
#include "utils/env.h"
#include "utils/filesystem.h"
#include "utils/flags.h"
#include "utils/string_conv.h"
Expand Down
1 change: 1 addition & 0 deletions src/replica/backup/replica_backup_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "replica_backup_manager.h"

#include <absl/strings/string_view.h>
#include <stdint.h>
#include <algorithm>
#include <chrono>
Expand Down
3 changes: 1 addition & 2 deletions src/replica/duplication/mutation_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
// specific language governing permissions and limitations
// under the License.

#include <fmt/core.h>
#include <functional>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "absl/strings/string_view.h"
#include "common/replication.codes.h"
#include "consensus_types.h"
#include "metadata_types.h"
Expand All @@ -33,7 +33,6 @@
#include "utils/blob.h"
#include "utils/error_code.h"
#include "utils/fmt_logging.h"
#include "absl/strings/string_view.h"

METRIC_DEFINE_gauge_int64(replica,
dup_recent_lost_mutations,
Expand Down
1 change: 1 addition & 0 deletions src/replica/duplication/replica_duplicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "replica_duplicator.h"

#include <absl/strings/string_view.h>
#include <rapidjson/document.h>
#include <rapidjson/encodings.h>
#include <rapidjson/stringbuffer.h>
Expand Down
1 change: 1 addition & 0 deletions src/replica/duplication/replica_duplicator_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#include <absl/strings/string_view.h>
#include <algorithm>
#include <cstdint>
#include <memory>
Expand Down
5 changes: 1 addition & 4 deletions src/replica/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@

#include "replica.h"

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <inttypes.h>
#include <rocksdb/status.h>
#include <functional>
#include <iosfwd>
#include <set>
#include <vector>

#include "backup/replica_backup_manager.h"
Expand Down
3 changes: 1 addition & 2 deletions src/replica/replica_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

#include "replica_base.h"

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <iosfwd>

METRIC_DEFINE_entity(replica);

Expand Down
1 change: 1 addition & 0 deletions src/replica/replication_app_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "runtime/rpc/serialization.h"
#include "runtime/task/task_code.h"
#include "runtime/task/task_spec.h"
#include "utils/autoref_ptr.h"
#include "utils/binary_reader.h"
#include "utils/binary_writer.h"
#include "utils/blob.h"
Expand Down
5 changes: 0 additions & 5 deletions src/replica/test/mutation_log_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
#include "replica/mutation_log.h"

// IWYU pragma: no_include <ext/alloc_traits.h>
#include <fcntl.h>
// IWYU pragma: no_include <gtest/gtest-message.h>
// IWYU pragma: no_include <gtest/gtest-test-part.h>
#include <gtest/gtest.h>
#include <stdio.h>
#include <sys/types.h>
#include <cstdint>
#include <iostream>
Expand Down
8 changes: 2 additions & 6 deletions src/replica/test/replica_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
// specific language governing permissions and limitations
// under the License.

#include <gmock/gmock.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest-param-test.h>
// IWYU pragma: no_include <gtest/gtest-message.h>
// IWYU pragma: no_include <gtest/gtest-test-part.h>
#include <gtest/gtest.h>
#include <stddef.h>
#include <stdint.h>
#include <atomic>
Expand All @@ -43,6 +37,8 @@
#include "common/replication_other_types.h"
#include "consensus_types.h"
#include "dsn.layer2_types.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "http/http_server.h"
#include "metadata_types.h"
#include "replica/disk_cleaner.h"
Expand Down
1 change: 1 addition & 0 deletions src/runtime/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ START<== queue(server) == ENQUEUE <===== net(reply) ======= REPLY <=============
#include <string>
#include <vector>

#include "absl/strings/string_view.h"
#include "aio/aio_task.h"
#include "fmt/core.h"
#include "profiler_header.h"
Expand Down
1 change: 1 addition & 0 deletions src/runtime/rpc/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <list>
#include <utility>

#include "absl/strings/string_view.h"
#include "message_parser_manager.h"
#include "runtime/api_task.h"
#include "runtime/rpc/rpc_address.h"
Expand Down
1 change: 1 addition & 0 deletions src/runtime/task/task_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "task_queue.h"

#include "absl/strings/string_view.h"
#include "fmt/core.h"
#include "runtime/rpc/network.h"
#include "runtime/rpc/rpc_engine.h"
Expand Down
1 change: 1 addition & 0 deletions src/server/capacity_unit_calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "capacity_unit_calculator.h"

#include <absl/strings/string_view.h>
#include <rocksdb/status.h>
#include <sys/param.h>
#include <cmath>
Expand Down
3 changes: 1 addition & 2 deletions src/server/pegasus_event_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

#include "pegasus_event_listener.h"

#include <fmt/core.h>
#include <absl/strings/string_view.h>
#include <rocksdb/compaction_job_stats.h>
#include <rocksdb/table_properties.h>
#include <rocksdb/types.h>
#include <string>

#include "utils/autoref_ptr.h"
#include "utils/fmt_logging.h"
Expand Down
1 change: 1 addition & 0 deletions src/server/pegasus_manual_compact_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "pegasus_manual_compact_service.h"

#include <absl/strings/string_view.h>
#include <limits.h>
#include <rocksdb/options.h>
#include <list>
Expand Down
3 changes: 3 additions & 0 deletions src/server/pegasus_server_impl_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <rocksdb/cache.h>
#include <rocksdb/filter_policy.h>
#include <rocksdb/options.h>
Expand All @@ -25,6 +27,7 @@
#include <rocksdb/table.h>
#include <rocksdb/write_buffer_manager.h>
#include <stdio.h>
#include <algorithm>
#include <cstdint>
#include <memory>
#include <mutex>
Expand Down
1 change: 1 addition & 0 deletions src/server/pegasus_server_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <rocksdb/status.h>
#include <thrift/transport/TTransportException.h>
Expand Down
4 changes: 1 addition & 3 deletions src/server/pegasus_write_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
* under the License.
*/

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <rocksdb/status.h>
#include <stddef.h>
#include <algorithm>
#include <string>
#include <functional>
#include <iosfwd>
#include <set>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/server/test/pegasus_mutation_duplicator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <fmt/core.h>
#include <pegasus/error.h>
#include <sys/types.h>
#include <algorithm>
#include <memory>
#include <tuple>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/utils/builtin_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "utils/builtin_metrics.h"

#include <absl/strings/string_view.h>
#include <stdint.h>
#include <functional>

Expand Down
1 change: 1 addition & 0 deletions src/utils/latency_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "utils/latency_tracer.h"

#include <absl/strings/string_view.h>
#include <fmt/core.h>
#include <cstdint>
#include <iterator>
Expand Down
7 changes: 3 additions & 4 deletions src/utils/test/enum_helper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

#include "utils/enum_helper.h"

// IWYU pragma: no_include <gtest/gtest-message.h>
// IWYU pragma: no_include <gtest/gtest-param-test.h>
// IWYU pragma: no_include <gtest/gtest-test-part.h>
#include <gtest/gtest.h>
#include <tuple>
#include <vector>

#include "gtest/gtest.h"

namespace dsn {

enum class command_type
Expand Down

0 comments on commit fa82854

Please sign in to comment.