[couchdb] 01/04: Enable parameterized module calls
This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/couchdb.git commit 4d3dfc6c0aad1f8786d89616b961a51afec2cd6e Author: Paul J. Davis AuthorDate: Thu Jun 21 17:16:33 2018 -0500 Enable parameterized module calls This is a temporary bandaid to allow us to continue using parameterized modules with Erlang 21. We'll have to go back and modify every one of these files to avoid that as well as figuring out how to upgrade mochiweb to something that doesn't use parameterized modules by the time they are fully removed from Erlang. Fixes #1396 --- src/chttpd/src/chttpd.erl | 3 +++ src/chttpd/src/chttpd_db.erl | 3 +++ src/chttpd/src/chttpd_external.erl| 2 ++ src/chttpd/src/chttpd_prefer_header.erl | 1 + src/chttpd/src/chttpd_rewrite.erl | 3 +++ src/chttpd/test/chttpd_prefer_header_test.erl | 3 +++ src/couch/src/couch_httpd.erl | 3 +++ src/couch/src/couch_httpd_auth.erl| 3 +++ src/couch/src/couch_httpd_db.erl | 3 +++ src/couch/src/couch_httpd_external.erl| 2 ++ src/couch/src/couch_httpd_proxy.erl | 2 ++ src/couch/src/couch_httpd_rewrite.erl | 3 +++ src/couch/src/couch_httpd_vhost.erl | 2 ++ src/couch/test/couchdb_http_proxy_tests.erl | 2 ++ src/couch/test/test_web.erl | 2 ++ src/couch_index/src/couch_index.erl | 2 ++ src/fabric/src/fabric_doc_attachments.erl | 2 ++ src/fabric/src/fabric_doc_atts.erl| 2 ++ 18 files changed, 43 insertions(+) diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl index a562839..b606ad4 100644 --- a/src/chttpd/src/chttpd.erl +++ b/src/chttpd/src/chttpd.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("chttpd/include/chttpd.hrl"). diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl index 49d7b58..9cde6d9 100644 --- a/src/chttpd/src/chttpd_db.erl +++ b/src/chttpd/src/chttpd_db.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd_db). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("couch_mrview/include/couch_mrview.hrl"). diff --git a/src/chttpd/src/chttpd_external.erl b/src/chttpd/src/chttpd_external.erl index 64664b9..fa35c6b 100644 --- a/src/chttpd/src/chttpd_external.erl +++ b/src/chttpd/src/chttpd_external.erl @@ -12,6 +12,8 @@ -module(chttpd_external). +-compile(tuple_calls). + -export([handle_external_req/2, handle_external_req/3]). -export([send_external_response/2]). -export([json_req_obj_fields/0, json_req_obj/2, json_req_obj/3, json_req_obj/4]). diff --git a/src/chttpd/src/chttpd_prefer_header.erl b/src/chttpd/src/chttpd_prefer_header.erl index f550e80..1ad1443 100644 --- a/src/chttpd/src/chttpd_prefer_header.erl +++ b/src/chttpd/src/chttpd_prefer_header.erl @@ -12,6 +12,7 @@ -module(chttpd_prefer_header). +-compile(tuple_calls). -export([ maybe_return_minimal/2 diff --git a/src/chttpd/src/chttpd_rewrite.erl b/src/chttpd/src/chttpd_rewrite.erl index 24a4824..0196513 100644 --- a/src/chttpd/src/chttpd_rewrite.erl +++ b/src/chttpd/src/chttpd_rewrite.erl @@ -16,6 +16,9 @@ %% @doc Module for URL rewriting by pattern matching. -module(chttpd_rewrite). + +-compile(tuple_calls). + -export([handle_rewrite_req/3]). -include_lib("couch/include/couch_db.hrl"). diff --git a/src/chttpd/test/chttpd_prefer_header_test.erl b/src/chttpd/test/chttpd_prefer_header_test.erl index a8a5b3d..0f43ba4 100644 --- a/src/chttpd/test/chttpd_prefer_header_test.erl +++ b/src/chttpd/test/chttpd_prefer_header_test.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd_prefer_header_test). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("eunit/include/eunit.hrl"). diff --git a/src/couch/src/couch_httpd.erl b/src/couch/src/couch_httpd.erl index a8cfca6..ec397c2 100644 --- a/src/couch/src/couch_httpd.erl +++ b/src/couch/src/couch_httpd.erl @@ -11,6 +11,9 @@ % the License. -module(couch_httpd). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -export([start_link/0, start_link/1, stop/0, handle_request/5]). diff --git a/src/couch/src/couch_httpd_auth.erl b/src/couch/src/couch_httpd_auth.erl index 6ac7b75..6607271 100644 --- a/src/couch/src/couch_httpd_auth.erl +++ b/src/couch/src/couch_httpd_auth.erl @@ -11,6 +11,9 @@ % the License. -module(couch_httpd_auth). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -export([party_mode_handler/1]). diff --git a/src/couch/src/couch_httpd_db.erl b/src/couch/src/couch_httpd_db.erl index 81209d9..ced146e 100644 --- a/src/couch/src/couch_httpd_db.erl +++ b/src/couch/src/couch_httpd_db.erl @@ -11,6 +11,9 @@ % the License
[couchdb] 01/04: Enable parameterized module calls
This is an automated email from the ASF dual-hosted git repository. davisp pushed a commit to branch fix-erlang-21-eunit-failures in repository https://gitbox.apache.org/repos/asf/couchdb.git commit 8229cfc0774371881708c78166ca0dacd2ea77c6 Author: Paul J. Davis AuthorDate: Thu Jun 21 17:16:33 2018 -0500 Enable parameterized module calls This is a temporary bandaid to allow us to continue using parameterized modules with Erlang 21. We'll have to go back and modify every one of these files to avoid that as well as figuring out how to upgrade mochiweb to something that doesn't use parameterized modules by the time they are fully removed from Erlang. --- src/chttpd/src/chttpd.erl | 3 +++ src/chttpd/src/chttpd_db.erl | 3 +++ src/chttpd/src/chttpd_external.erl| 2 ++ src/chttpd/src/chttpd_prefer_header.erl | 1 + src/chttpd/src/chttpd_rewrite.erl | 3 +++ src/chttpd/test/chttpd_prefer_header_test.erl | 3 +++ src/couch/src/couch_httpd.erl | 3 +++ src/couch/src/couch_httpd_auth.erl| 3 +++ src/couch/src/couch_httpd_db.erl | 3 +++ src/couch/src/couch_httpd_external.erl| 2 ++ src/couch/src/couch_httpd_proxy.erl | 2 ++ src/couch/src/couch_httpd_rewrite.erl | 3 +++ src/couch/src/couch_httpd_vhost.erl | 2 ++ src/couch/test/couchdb_http_proxy_tests.erl | 2 ++ src/couch/test/test_web.erl | 2 ++ src/couch_index/src/couch_index.erl | 2 ++ src/fabric/src/fabric_doc_attachments.erl | 2 ++ src/fabric/src/fabric_doc_atts.erl| 2 ++ 18 files changed, 43 insertions(+) diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl index ae94ae6..658b63c 100644 --- a/src/chttpd/src/chttpd.erl +++ b/src/chttpd/src/chttpd.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("chttpd/include/chttpd.hrl"). diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl index ed0adea..228ebf1 100644 --- a/src/chttpd/src/chttpd_db.erl +++ b/src/chttpd/src/chttpd_db.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd_db). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("couch_mrview/include/couch_mrview.hrl"). diff --git a/src/chttpd/src/chttpd_external.erl b/src/chttpd/src/chttpd_external.erl index 64664b9..fa35c6b 100644 --- a/src/chttpd/src/chttpd_external.erl +++ b/src/chttpd/src/chttpd_external.erl @@ -12,6 +12,8 @@ -module(chttpd_external). +-compile(tuple_calls). + -export([handle_external_req/2, handle_external_req/3]). -export([send_external_response/2]). -export([json_req_obj_fields/0, json_req_obj/2, json_req_obj/3, json_req_obj/4]). diff --git a/src/chttpd/src/chttpd_prefer_header.erl b/src/chttpd/src/chttpd_prefer_header.erl index f550e80..1ad1443 100644 --- a/src/chttpd/src/chttpd_prefer_header.erl +++ b/src/chttpd/src/chttpd_prefer_header.erl @@ -12,6 +12,7 @@ -module(chttpd_prefer_header). +-compile(tuple_calls). -export([ maybe_return_minimal/2 diff --git a/src/chttpd/src/chttpd_rewrite.erl b/src/chttpd/src/chttpd_rewrite.erl index 039390e..08c9ef3 100644 --- a/src/chttpd/src/chttpd_rewrite.erl +++ b/src/chttpd/src/chttpd_rewrite.erl @@ -16,6 +16,9 @@ %% @doc Module for URL rewriting by pattern matching. -module(chttpd_rewrite). + +-compile(tuple_calls). + -export([handle_rewrite_req/3]). -include_lib("couch/include/couch_db.hrl"). diff --git a/src/chttpd/test/chttpd_prefer_header_test.erl b/src/chttpd/test/chttpd_prefer_header_test.erl index a8a5b3d..0f43ba4 100644 --- a/src/chttpd/test/chttpd_prefer_header_test.erl +++ b/src/chttpd/test/chttpd_prefer_header_test.erl @@ -11,6 +11,9 @@ % the License. -module(chttpd_prefer_header_test). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -include_lib("eunit/include/eunit.hrl"). diff --git a/src/couch/src/couch_httpd.erl b/src/couch/src/couch_httpd.erl index 050282a..b4f01af 100644 --- a/src/couch/src/couch_httpd.erl +++ b/src/couch/src/couch_httpd.erl @@ -11,6 +11,9 @@ % the License. -module(couch_httpd). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -export([start_link/0, start_link/1, stop/0, handle_request/5]). diff --git a/src/couch/src/couch_httpd_auth.erl b/src/couch/src/couch_httpd_auth.erl index 74cbe5a..edd71e8 100644 --- a/src/couch/src/couch_httpd_auth.erl +++ b/src/couch/src/couch_httpd_auth.erl @@ -11,6 +11,9 @@ % the License. -module(couch_httpd_auth). + +-compile(tuple_calls). + -include_lib("couch/include/couch_db.hrl"). -export([party_mode_handler/1]). diff --git a/src/couch/src/couch_httpd_db.erl b/src/couch/src/couch_httpd_db.erl index 99b1192..220a032 100644 --- a/src/couch/src/couch_httpd_db.erl +++ b/src/couch/src/couch_httpd_db.erl @@ -11,6 +11,9 @@ % the License.