Skip to content

Commit

Permalink
treewide: drop includes of <boost/range/adaptors.hpp>
Browse files Browse the repository at this point in the history
This includes way too much, including <boost/regex.hpp>, which is huge.
Drop includes of adaptors.hpp and replace by what is needed.

Closes scylladb#21187
  • Loading branch information
avikivity authored and nyh committed Oct 20, 2024
1 parent 29c2d4e commit c3be248
Show file tree
Hide file tree
Showing 50 changed files with 28 additions and 46 deletions.
1 change: 0 additions & 1 deletion alternator/executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "replica/database.hh"
#include "alternator/rmw_operation.hh"
#include <seastar/core/coroutine.hh>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/find_end.hpp>
#include <unordered_set>
#include "service/storage_proxy.hh"
Expand Down
1 change: 0 additions & 1 deletion api/task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "utils/overloaded_functor.hh"

#include <utility>
#include <boost/range/adaptors.hpp>

namespace api {

Expand Down
1 change: 0 additions & 1 deletion compaction/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <algorithm>

#include <boost/range/algorithm.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/join.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/algorithm/string/join.hpp>
Expand Down
1 change: 0 additions & 1 deletion compaction/compaction_strategy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "schema/schema.hh"
#include <boost/range/algorithm/find.hpp>
#include <boost/range/algorithm/remove_if.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include "size_tiered_compaction_strategy.hh"
#include "leveled_compaction_strategy.hh"
Expand Down
2 changes: 1 addition & 1 deletion compaction/size_tiered_compaction_strategy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "cql3/statements/property_definitions.hh"

#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/range/algorithm.hpp>

namespace sstables {
Expand Down
3 changes: 2 additions & 1 deletion cql3/functions/functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "user_aggregate.hh"
#include "cql3/expr/expression.hh"
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/map.hpp>

#include "error_injection_fcts.hh"

Expand Down
3 changes: 2 additions & 1 deletion cql3/restrictions/statement_restrictions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#include <algorithm>
#include <boost/algorithm/cxx11/all_of.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/map.hpp>
#include <functional>
#include <ranges>
#include <stdexcept>
Expand Down
2 changes: 1 addition & 1 deletion cql3/selection/selection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/

#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/algorithm/cxx11/all_of.hpp>

Expand Down
1 change: 0 additions & 1 deletion cql3/statements/delete_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "utils/assert.hh"
#include <boost/algorithm/cxx11/all_of.hpp>
#include <boost/range/adaptors.hpp>

#include "data_dictionary/data_dictionary.hh"
#include "delete_statement.hh"
Expand Down
1 change: 0 additions & 1 deletion cql3/statements/prune_materialized_view_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "cql3/restrictions/statement_restrictions.hh"
#include "cql3/query_processor.hh"
#include "service/storage_proxy.hh"
#include <boost/range/adaptors.hpp>
#include <fmt/ranges.h>
#include <seastar/core/coroutine.hh>

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

#include "cql3/statements/strongly_consistent_modification_statement.hh"

#include <boost/range/adaptors.hpp>
#include <optional>

#include <seastar/core/future.hh>
Expand Down
2 changes: 1 addition & 1 deletion db/hints/internal/hint_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <seastar/core/sstring.hh>

// Boost features.
#include <boost/range/adaptors.hpp>
#include <boost/range/adaptor/map.hpp>

// Scylla includes.
#include "db/hints/internal/hint_logger.hh"
Expand Down
1 change: 0 additions & 1 deletion db/hints/manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <seastar/coroutine/parallel_for_each.hh>

// Boost features.
#include <boost/range/adaptors.hpp>

// Scylla includes.
#include "db/hints/internal/hint_logger.hh"
Expand Down
1 change: 0 additions & 1 deletion db/snapshot-ctl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/

#include <stdexcept>
#include <boost/range/adaptors.hpp>
#include <seastar/core/coroutine.hh>
#include <seastar/coroutine/maybe_yield.hh>
#include <seastar/coroutine/switch_to.hh>
Expand Down
1 change: 0 additions & 1 deletion db/view/view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <boost/range/algorithm/find_if.hpp>
#include <boost/range/algorithm/remove_if.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/algorithm/cxx11/all_of.hpp>

Expand Down
1 change: 0 additions & 1 deletion dht/range_streamer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "log.hh"
#include "streaming/stream_plan.hh"
#include "db/config.hh"
#include <boost/range/adaptors.hpp>
#include <fmt/ranges.h>
#include <seastar/core/semaphore.hh>
#include <seastar/core/sleep.hh>
Expand Down
2 changes: 1 addition & 1 deletion gms/gossiper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
#include <chrono>
#include "locator/host_id.hh"
#include <boost/range/algorithm/set_algorithm.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/count_if.hpp>
#include <boost/range/algorithm/partition.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <utility>
Expand Down
1 change: 0 additions & 1 deletion index/secondary_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <boost/regex.hpp>
#include <boost/range/algorithm/find_if.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptors.hpp>
#include <seastar/util/log.hh>

#include "exceptions/exceptions.hh"
Expand Down
1 change: 0 additions & 1 deletion locator/network_topology_strategy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <absl/container/flat_hash_map.h>
#include <boost/algorithm/string.hpp>
#include <boost/range/adaptors.hpp>
#include "exceptions/exceptions.hh"
#include "utils/assert.hh"
#include "utils/class_registrator.hh"
Expand Down
1 change: 0 additions & 1 deletion locator/token_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <boost/icl/interval_map.hpp>
#include <seastar/core/coroutine.hh>
#include <seastar/coroutine/maybe_yield.hh>
#include <boost/range/adaptors.hpp>
#include <seastar/core/smp.hh>
#include "utils/assert.hh"
#include "utils/stall_free.hh"
Expand Down
3 changes: 2 additions & 1 deletion repair/repair.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

#pragma once

#include <boost/range/adaptor/map.hpp>

#include <unordered_map>
#include <exception>
#include <absl/container/btree_set.h>
#include <fmt/core.h>
#include <boost/range/adaptors.hpp>

#include <seastar/core/abort_source.hh>
#include <seastar/core/sstring.hh>
Expand Down
1 change: 0 additions & 1 deletion repair/row_level.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <algorithm>
#include <random>
#include <optional>
#include <boost/range/adaptors.hpp>
#include <boost/intrusive/list.hpp>
#include "gms/i_endpoint_state_change_subscriber.hh"
#include "gms/gossiper.hh"
Expand Down
1 change: 1 addition & 0 deletions service/qos/service_level_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "cql3/util.hh"
#include "utils/assert.hh"
#include <boost/algorithm/string/join.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <chrono>

#include <seastar/core/sleep.hh>
Expand Down
1 change: 0 additions & 1 deletion service/storage_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#include "utils/user_provided_param.hh"
#include "version.hh"
#include "dht/range_streamer.hh"
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include "transport/server.hh"
#include <seastar/core/rwlock.hh>
Expand Down
2 changes: 1 addition & 1 deletion service/topology_state_machine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "topology_state_machine.hh"
#include "log.hh"

#include <boost/range/adaptors.hpp>
#include <boost/range/adaptor/map.hpp>

namespace service {

Expand Down
2 changes: 1 addition & 1 deletion sstables/generation_type.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <compare>
#include <limits>
#include <stdexcept>
#include <boost/range/adaptors.hpp>
#include <seastar/core/on_internal_error.hh>
#include <seastar/core/smp.hh>
#include <seastar/core/sstring.hh>
#include <boost/range/adaptor/transformed.hpp>
#include "types/types.hh"
#include "utils/assert.hh"
#include "utils/UUID_gen.hh"
Expand Down
2 changes: 0 additions & 2 deletions tasks/task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

#include <boost/range/adaptors.hpp>

#include <seastar/core/on_internal_error.hh>
#include <seastar/coroutine/parallel_for_each.hh>
Expand All @@ -16,7 +15,6 @@
#include <seastar/rpc/rpc_types.hh>
#include <seastar/util/defer.hh>

#include <boost/range/adaptors.hpp>

#include "db/timeout_clock.hh"
#include "message/messaging_service.hh"
Expand Down
3 changes: 2 additions & 1 deletion tasks/task_manager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#pragma once

#include <list>
#include <boost/range/adaptors.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/join.hpp>
#include <seastar/core/on_internal_error.hh>
Expand Down
1 change: 0 additions & 1 deletion test/boost/aggregate_fcts_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/boost/auth_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <stdint.h>
Expand Down
1 change: 0 additions & 1 deletion test/boost/batchlog_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <stdint.h>
Expand Down
1 change: 0 additions & 1 deletion test/boost/castas_fcts_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/boost/cql_functions_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <algorithm>

#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/adaptor/uniqued.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>

Expand Down
1 change: 0 additions & 1 deletion test/boost/cql_query_group_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/boost/cql_query_large_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/boost/cql_query_like_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/boost/cql_query_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include <boost/algorithm/string/join.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>

Expand Down
1 change: 0 additions & 1 deletion test/boost/filtering_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/boost/json_cql_query_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/multiprecision/cpp_int.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/boost/network_topology_strategy_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

#include <boost/test/unit_test.hpp>
#include <boost/range/adaptors.hpp>
#include <fmt/ranges.h>
#include "gms/inet_address.hh"
#include "locator/types.hh"
Expand Down
1 change: 0 additions & 1 deletion test/boost/query_processor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <fmt/ranges.h>
Expand Down
1 change: 0 additions & 1 deletion test/boost/restrictions_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

#include <boost/range/adaptors.hpp>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include "test/lib/scylla_test_case.hh"
Expand Down
2 changes: 2 additions & 0 deletions test/boost/tablets_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "utils/to_string.hh"
#include "service/topology_coordinator.hh"

#include <boost/regex.hpp>

using namespace locator;
using namespace replica;
using namespace service;
Expand Down
1 change: 0 additions & 1 deletion test/boost/virtual_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/test/unit_test.hpp>
#include <stdint.h>
Expand Down
1 change: 1 addition & 0 deletions test/lib/mutation_source_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <set>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/adaptor/sliced.hpp>
#include <boost/test/unit_test.hpp>
#include <fmt/ranges.h>
#include "partition_slice_builder.hh"
Expand Down
Loading

0 comments on commit c3be248

Please sign in to comment.