This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch clean-up-unused-includes in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 40764218fa1ac64f335e3829f1335303abdd1c11 Author: Nick Vatamaniuc <[email protected]> AuthorDate: Sat Nov 1 04:57:19 2025 -0400 Remove unused includes --- src/chttpd/src/chttpd_db.erl | 1 - src/chttpd/src/chttpd_handlers.erl | 2 -- src/chttpd/src/chttpd_plugin.erl | 2 -- src/chttpd/src/chttpd_stats.erl | 1 - src/couch/src/couch_db_plugin.erl | 2 -- src/couch/src/couch_event_sup.erl | 2 -- src/couch/src/couch_httpd_multipart.erl | 2 -- src/couch/src/couch_httpd_vhost.erl | 2 -- src/couch/src/couch_stream.erl | 2 -- src/couch/src/couch_sup.erl | 2 -- src/couch_index/src/couch_index_compactor.erl | 2 -- src/couch_index/src/couch_index_plugin.erl | 2 -- src/couch_log/src/couch_log_server.erl | 2 -- src/couch_mrview/src/couch_mrview_update_notifier.erl | 2 -- src/couch_pse_tests/src/cpse_test_ref_counting.erl | 1 - src/couch_replicator/src/couch_replicator_auth_session.erl | 1 - src/couch_replicator/src/couch_replicator_httpc_pool.erl | 2 -- src/ddoc_cache/src/ddoc_cache_entry.erl | 1 - src/dreyfus/src/dreyfus_rpc.erl | 1 - src/fabric/src/fabric_db_create.erl | 1 - src/fabric/src/fabric_db_delete.erl | 1 - src/fabric/src/fabric_db_doc_count.erl | 2 -- src/fabric/src/fabric_db_info.erl | 1 - src/fabric/src/fabric_db_partition_info.erl | 1 - src/fabric/src/fabric_db_update_listener.erl | 1 - src/fabric/src/fabric_db_uuids.erl | 1 - src/fabric/src/fabric_design_doc_count.erl | 2 -- src/fabric/src/fabric_doc_atts.erl | 1 - src/fabric/src/fabric_doc_missing_revs.erl | 1 - src/fabric/src/fabric_group_info.erl | 1 - src/global_changes/src/global_changes_plugin.erl | 2 -- src/mango/src/mango_cursor.erl | 1 - src/mango/src/mango_cursor_nouveau.erl | 2 -- src/mango/src/mango_cursor_text.erl | 1 - src/mango/src/mango_httpd.erl | 1 - src/mem3/src/mem3_nodes.erl | 1 - src/mem3/src/mem3_reshard_job_sup.erl | 2 -- src/mem3/src/mem3_rpc.erl | 1 - 38 files changed, 56 deletions(-) diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl index 111ae4eed..8585a5d84 100644 --- a/src/chttpd/src/chttpd_db.erl +++ b/src/chttpd/src/chttpd_db.erl @@ -16,7 +16,6 @@ -include_lib("couch/include/couch_db.hrl"). -include_lib("couch_mrview/include/couch_mrview.hrl"). --include_lib("mem3/include/mem3.hrl"). -export([ handle_request/1, diff --git a/src/chttpd/src/chttpd_handlers.erl b/src/chttpd/src/chttpd_handlers.erl index 82eee7365..6bdf77dda 100644 --- a/src/chttpd/src/chttpd_handlers.erl +++ b/src/chttpd/src/chttpd_handlers.erl @@ -20,8 +20,6 @@ -define(SERVICE_ID, chttpd_handlers). --include_lib("couch/include/couch_db.hrl"). - %% ------------------------------------------------------------------ %% API Function Definitions %% ------------------------------------------------------------------ diff --git a/src/chttpd/src/chttpd_plugin.erl b/src/chttpd/src/chttpd_plugin.erl index 03d8ad6ac..d467beac2 100644 --- a/src/chttpd/src/chttpd_plugin.erl +++ b/src/chttpd/src/chttpd_plugin.erl @@ -22,8 +22,6 @@ -define(SERVICE_ID, chttpd). --include_lib("couch/include/couch_db.hrl"). - %% ------------------------------------------------------------------ %% API Function Definitions %% ------------------------------------------------------------------ diff --git a/src/chttpd/src/chttpd_stats.erl b/src/chttpd/src/chttpd_stats.erl index 080def454..0352da916 100644 --- a/src/chttpd/src/chttpd_stats.erl +++ b/src/chttpd/src/chttpd_stats.erl @@ -13,7 +13,6 @@ -module(chttpd_stats). % for the stacktrace macro only so far --include_lib("couch/include/couch_db.hrl"). -export([ init/0, diff --git a/src/couch/src/couch_db_plugin.erl b/src/couch/src/couch_db_plugin.erl index c84edc1b7..40731af80 100644 --- a/src/couch/src/couch_db_plugin.erl +++ b/src/couch/src/couch_db_plugin.erl @@ -25,8 +25,6 @@ -define(SERVICE_ID, couch_db). --include_lib("couch/include/couch_db.hrl"). - %% ------------------------------------------------------------------ %% API Function Definitions %% ------------------------------------------------------------------ diff --git a/src/couch/src/couch_event_sup.erl b/src/couch/src/couch_event_sup.erl index 5ddc561c0..efddb91fb 100644 --- a/src/couch/src/couch_event_sup.erl +++ b/src/couch/src/couch_event_sup.erl @@ -17,8 +17,6 @@ -module(couch_event_sup). -behaviour(gen_server). --include_lib("couch/include/couch_db.hrl"). - -export([start_link/3, start_link/4, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). diff --git a/src/couch/src/couch_httpd_multipart.erl b/src/couch/src/couch_httpd_multipart.erl index 87c588fc8..593c4c315 100644 --- a/src/couch/src/couch_httpd_multipart.erl +++ b/src/couch/src/couch_httpd_multipart.erl @@ -21,8 +21,6 @@ num_mp_writers/1 ]). --include_lib("couch/include/couch_db.hrl"). - decode_multipart_stream(ContentType, DataFun, Ref) -> Parent = self(), NumMpWriters = num_mp_writers(), diff --git a/src/couch/src/couch_httpd_vhost.erl b/src/couch/src/couch_httpd_vhost.erl index 91da711af..4d9c7def1 100644 --- a/src/couch/src/couch_httpd_vhost.erl +++ b/src/couch/src/couch_httpd_vhost.erl @@ -25,8 +25,6 @@ % config_listener api -export([handle_config_change/5, handle_config_terminate/3]). --include_lib("couch/include/couch_db.hrl"). - -define(SEPARATOR, $\/). -define(MATCH_ALL, {bind, '*'}). -define(RELISTEN_DELAY, 5000). diff --git a/src/couch/src/couch_stream.erl b/src/couch/src/couch_stream.erl index 2998cd3ff..0e4ccdae6 100644 --- a/src/couch/src/couch_stream.erl +++ b/src/couch/src/couch_stream.erl @@ -35,8 +35,6 @@ handle_info/2 ]). --include_lib("couch/include/couch_db.hrl"). - -define(DEFAULT_BUFFER_SIZE, 4096). -record(stream, { diff --git a/src/couch/src/couch_sup.erl b/src/couch/src/couch_sup.erl index e436a5c84..8fd6f368c 100644 --- a/src/couch/src/couch_sup.erl +++ b/src/couch/src/couch_sup.erl @@ -21,8 +21,6 @@ handle_config_terminate/3 ]). --include_lib("couch/include/couch_db.hrl"). - start_link() -> assert_no_monsters(), assert_admins(), diff --git a/src/couch_index/src/couch_index_compactor.erl b/src/couch_index/src/couch_index_compactor.erl index 2bfe9b804..35671e4fd 100644 --- a/src/couch_index/src/couch_index_compactor.erl +++ b/src/couch_index/src/couch_index_compactor.erl @@ -20,8 +20,6 @@ -export([init/1, terminate/2]). -export([handle_call/3, handle_cast/2, handle_info/2]). --include_lib("couch/include/couch_db.hrl"). - -record(st, { idx, mod, diff --git a/src/couch_index/src/couch_index_plugin.erl b/src/couch_index/src/couch_index_plugin.erl index 4c2f7e68a..aa33653c6 100644 --- a/src/couch_index/src/couch_index_plugin.erl +++ b/src/couch_index/src/couch_index_plugin.erl @@ -16,8 +16,6 @@ -export([before_open/2]). --include_lib("couch/include/couch_db.hrl"). - -define(SERVICE_ID, couch_index). %% ------------------------------------------------------------------ diff --git a/src/couch_log/src/couch_log_server.erl b/src/couch_log/src/couch_log_server.erl index d778ab7d2..0191b05ee 100644 --- a/src/couch_log/src/couch_log_server.erl +++ b/src/couch_log/src/couch_log_server.erl @@ -27,8 +27,6 @@ handle_info/2 ]). --include("couch_log.hrl"). - -record(st, { writer }). diff --git a/src/couch_mrview/src/couch_mrview_update_notifier.erl b/src/couch_mrview/src/couch_mrview_update_notifier.erl index 699a14b3b..639d58c61 100644 --- a/src/couch_mrview/src/couch_mrview_update_notifier.erl +++ b/src/couch_mrview/src/couch_mrview_update_notifier.erl @@ -17,8 +17,6 @@ -export([start_link/1, notify/1]). -export([init/1, handle_event/2, handle_call/2, handle_info/2, stop/1]). --include_lib("couch/include/couch_db.hrl"). - start_link(Exec) -> couch_event_sup:start_link( couch_mrview_update, {couch_mrview_update_notifier, make_ref()}, Exec diff --git a/src/couch_pse_tests/src/cpse_test_ref_counting.erl b/src/couch_pse_tests/src/cpse_test_ref_counting.erl index 401353f37..e578c2e7d 100644 --- a/src/couch_pse_tests/src/cpse_test_ref_counting.erl +++ b/src/couch_pse_tests/src/cpse_test_ref_counting.erl @@ -15,7 +15,6 @@ -compile(nowarn_export_all). -include_lib("eunit/include/eunit.hrl"). --include_lib("couch/include/couch_db.hrl"). -define(NUM_CLIENTS, 1000). diff --git a/src/couch_replicator/src/couch_replicator_auth_session.erl b/src/couch_replicator/src/couch_replicator_auth_session.erl index 316ce015e..93ddc834f 100644 --- a/src/couch_replicator/src/couch_replicator_auth_session.erl +++ b/src/couch_replicator/src/couch_replicator_auth_session.erl @@ -65,7 +65,6 @@ format_status/1 ]). --include_lib("ibrowse/include/ibrowse.hrl"). -include_lib("couch_replicator/include/couch_replicator_api_wrap.hrl"). -type headers() :: [{string(), string()}]. diff --git a/src/couch_replicator/src/couch_replicator_httpc_pool.erl b/src/couch_replicator/src/couch_replicator_httpc_pool.erl index 3c2f6edfa..4d293ddf9 100644 --- a/src/couch_replicator/src/couch_replicator_httpc_pool.erl +++ b/src/couch_replicator/src/couch_replicator_httpc_pool.erl @@ -21,8 +21,6 @@ -export([init/1, handle_call/3, handle_info/2, handle_cast/2]). -export([format_status/1]). --include_lib("couch/include/couch_db.hrl"). - -import(couch_util, [ get_value/2 ]). diff --git a/src/ddoc_cache/src/ddoc_cache_entry.erl b/src/ddoc_cache/src/ddoc_cache_entry.erl index 694cafe8f..6a6daa1c2 100644 --- a/src/ddoc_cache/src/ddoc_cache_entry.erl +++ b/src/ddoc_cache/src/ddoc_cache_entry.erl @@ -14,7 +14,6 @@ -behaviour(gen_server). % for the stacktrace macro only so far --include_lib("couch/include/couch_db.hrl"). -export([ dbname/1, diff --git a/src/dreyfus/src/dreyfus_rpc.erl b/src/dreyfus/src/dreyfus_rpc.erl index 3aed82d76..5fbe194dc 100644 --- a/src/dreyfus/src/dreyfus_rpc.erl +++ b/src/dreyfus/src/dreyfus_rpc.erl @@ -13,7 +13,6 @@ %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- -module(dreyfus_rpc). --include_lib("couch/include/couch_db.hrl"). -include("dreyfus.hrl"). -import(couch_query_servers, [get_os_process/1, ret_os_process/1, proc_prompt/2]). diff --git a/src/fabric/src/fabric_db_create.erl b/src/fabric/src/fabric_db_create.erl index 3f378dc73..ae92d2406 100644 --- a/src/fabric/src/fabric_db_create.erl +++ b/src/fabric/src/fabric_db_create.erl @@ -13,7 +13,6 @@ -module(fabric_db_create). -export([go/2]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). diff --git a/src/fabric/src/fabric_db_delete.erl b/src/fabric/src/fabric_db_delete.erl index 5a95b0324..b57342622 100644 --- a/src/fabric/src/fabric_db_delete.erl +++ b/src/fabric/src/fabric_db_delete.erl @@ -13,7 +13,6 @@ -module(fabric_db_delete). -export([go/2]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). %% @doc Options aren't used at all now in couch on delete but are left here diff --git a/src/fabric/src/fabric_db_doc_count.erl b/src/fabric/src/fabric_db_doc_count.erl index b2ab35b81..53799b797 100644 --- a/src/fabric/src/fabric_db_doc_count.erl +++ b/src/fabric/src/fabric_db_doc_count.erl @@ -14,9 +14,7 @@ -export([go/1]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). --include_lib("couch/include/couch_db.hrl"). go(DbName) -> Shards = mem3:shards(DbName), diff --git a/src/fabric/src/fabric_db_info.erl b/src/fabric/src/fabric_db_info.erl index 5461404c5..9ad118e50 100644 --- a/src/fabric/src/fabric_db_info.erl +++ b/src/fabric/src/fabric_db_info.erl @@ -14,7 +14,6 @@ -export([go/1]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). go(DbName) -> diff --git a/src/fabric/src/fabric_db_partition_info.erl b/src/fabric/src/fabric_db_partition_info.erl index efc895534..2b4685fd2 100644 --- a/src/fabric/src/fabric_db_partition_info.erl +++ b/src/fabric/src/fabric_db_partition_info.erl @@ -14,7 +14,6 @@ -export([go/2]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -record(acc, { diff --git a/src/fabric/src/fabric_db_update_listener.erl b/src/fabric/src/fabric_db_update_listener.erl index e91f2ec5a..3ac00da5c 100644 --- a/src/fabric/src/fabric_db_update_listener.erl +++ b/src/fabric/src/fabric_db_update_listener.erl @@ -15,7 +15,6 @@ -export([go/5, start_update_notifier/1, stop/1, wait_db_updated/1]). -export([handle_db_event/3]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -record(worker, { diff --git a/src/fabric/src/fabric_db_uuids.erl b/src/fabric/src/fabric_db_uuids.erl index 12931a3d1..131505370 100644 --- a/src/fabric/src/fabric_db_uuids.erl +++ b/src/fabric/src/fabric_db_uuids.erl @@ -14,7 +14,6 @@ -export([go/1]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). go(DbName) when is_binary(DbName) -> diff --git a/src/fabric/src/fabric_design_doc_count.erl b/src/fabric/src/fabric_design_doc_count.erl index f6f866a24..1331b1f7b 100644 --- a/src/fabric/src/fabric_design_doc_count.erl +++ b/src/fabric/src/fabric_design_doc_count.erl @@ -14,9 +14,7 @@ -export([go/1]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). --include_lib("couch/include/couch_db.hrl"). go(DbName) -> Shards = mem3:shards(DbName), diff --git a/src/fabric/src/fabric_doc_atts.erl b/src/fabric/src/fabric_doc_atts.erl index 80a36ee51..975d2215f 100644 --- a/src/fabric/src/fabric_doc_atts.erl +++ b/src/fabric/src/fabric_doc_atts.erl @@ -14,7 +14,6 @@ -compile(tuple_calls). --include_lib("fabric/include/fabric.hrl"). -include_lib("couch/include/couch_db.hrl"). -export([ diff --git a/src/fabric/src/fabric_doc_missing_revs.erl b/src/fabric/src/fabric_doc_missing_revs.erl index ffd408f4e..f941a3764 100644 --- a/src/fabric/src/fabric_doc_missing_revs.erl +++ b/src/fabric/src/fabric_doc_missing_revs.erl @@ -14,7 +14,6 @@ -export([go/2, go/3]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). go(DbName, AllIdsRevs) -> diff --git a/src/fabric/src/fabric_group_info.erl b/src/fabric/src/fabric_group_info.erl index 93e81a1d9..29f4835a0 100644 --- a/src/fabric/src/fabric_group_info.erl +++ b/src/fabric/src/fabric_group_info.erl @@ -14,7 +14,6 @@ -export([go/2]). --include_lib("fabric/include/fabric.hrl"). -include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). diff --git a/src/global_changes/src/global_changes_plugin.erl b/src/global_changes/src/global_changes_plugin.erl index 8e42d56bd..ce7ee99e0 100644 --- a/src/global_changes/src/global_changes_plugin.erl +++ b/src/global_changes/src/global_changes_plugin.erl @@ -14,8 +14,6 @@ -export([transform_change/3]). --include_lib("couch/include/couch_db.hrl"). - -define(SERVICE_ID, global_changes). %% ------------------------------------------------------------------ diff --git a/src/mango/src/mango_cursor.erl b/src/mango/src/mango_cursor.erl index ee20eaaba..b78f3682e 100644 --- a/src/mango/src/mango_cursor.erl +++ b/src/mango/src/mango_cursor.erl @@ -22,7 +22,6 @@ maybe_noop_range/2 ]). --include_lib("couch/include/couch_db.hrl"). -include("mango.hrl"). -include("mango_cursor.hrl"). diff --git a/src/mango/src/mango_cursor_nouveau.erl b/src/mango/src/mango_cursor_nouveau.erl index 629c91a53..cca021d47 100644 --- a/src/mango/src/mango_cursor_nouveau.erl +++ b/src/mango/src/mango_cursor_nouveau.erl @@ -18,8 +18,6 @@ execute/3 ]). --include_lib("couch/include/couch_db.hrl"). --include_lib("nouveau/include/nouveau.hrl"). -include("mango_cursor.hrl"). -include("mango.hrl"). diff --git a/src/mango/src/mango_cursor_text.erl b/src/mango/src/mango_cursor_text.erl index 764d32d84..0fc92092d 100644 --- a/src/mango/src/mango_cursor_text.erl +++ b/src/mango/src/mango_cursor_text.erl @@ -18,7 +18,6 @@ execute/3 ]). --include_lib("couch/include/couch_db.hrl"). -include_lib("dreyfus/include/dreyfus.hrl"). -include("mango_cursor.hrl"). -include("mango.hrl"). diff --git a/src/mango/src/mango_httpd.erl b/src/mango/src/mango_httpd.erl index 9bde45e1a..a4248654f 100644 --- a/src/mango/src/mango_httpd.erl +++ b/src/mango/src/mango_httpd.erl @@ -18,7 +18,6 @@ -include_lib("couch/include/couch_db.hrl"). -include("mango.hrl"). --include("mango_execution_stats.hrl"). -record(vacc, { resp, diff --git a/src/mem3/src/mem3_nodes.erl b/src/mem3/src/mem3_nodes.erl index 334128456..cf895dfab 100644 --- a/src/mem3/src/mem3_nodes.erl +++ b/src/mem3/src/mem3_nodes.erl @@ -21,7 +21,6 @@ -export([start_link/0, get_nodelist/0, get_node_info/2]). --include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -record(state, {changes_pid, update_seq}). diff --git a/src/mem3/src/mem3_reshard_job_sup.erl b/src/mem3/src/mem3_reshard_job_sup.erl index e98cb5a08..de3a51fb7 100644 --- a/src/mem3/src/mem3_reshard_job_sup.erl +++ b/src/mem3/src/mem3_reshard_job_sup.erl @@ -22,8 +22,6 @@ init/1 ]). --include("mem3_reshard.hrl"). - start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). diff --git a/src/mem3/src/mem3_rpc.erl b/src/mem3/src/mem3_rpc.erl index a70f6e036..c62954fc4 100644 --- a/src/mem3/src/mem3_rpc.erl +++ b/src/mem3/src/mem3_rpc.erl @@ -45,7 +45,6 @@ replicate_rpc/2 ]). --include("mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -define(BATCH_SIZE, 1000).
