You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/04/16 21:45:21 UTC

[couchdb] 16/24: Remove clouseau and dreyfus references from mango

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 3080cf561c1d120a01e418a2acecfaa78dc182d0
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed Apr 14 02:03:36 2021 -0400

    Remove clouseau and dreyfus references from mango
    
    Try to minimize changes and cheated a bit by returning `false` from
    `is_text_service_available()`. Also keeping in mind that we'd probably want
    this functionality in the future.
---
 src/mango/src/mango_cursor.erl |  8 --------
 src/mango/src/mango_idx.erl    | 17 +++--------------
 2 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/mango/src/mango_cursor.erl b/src/mango/src/mango_cursor.erl
index 63b449c..ed35817 100644
--- a/src/mango/src/mango_cursor.erl
+++ b/src/mango/src/mango_cursor.erl
@@ -30,18 +30,10 @@
 -include("mango_idx.hrl").
 
 
--ifdef(HAVE_DREYFUS).
 -define(CURSOR_MODULES, [
     mango_cursor_view,
-    mango_cursor_text,
     mango_cursor_special
 ]).
--else.
--define(CURSOR_MODULES, [
-    mango_cursor_view,
-    mango_cursor_special
-]).
--endif.
 
 -define(SUPERVISOR, mango_cursor_sup).
 
diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl
index 37b6e03..7108ae6 100644
--- a/src/mango/src/mango_idx.erl
+++ b/src/mango/src/mango_idx.erl
@@ -263,12 +263,7 @@ cursor_mod(#idx{type = <<"json">>}) ->
 cursor_mod(#idx{def = all_docs, type= <<"special">>}) ->
     mango_cursor_special;
 cursor_mod(#idx{type = <<"text">>}) ->
-    case clouseau_rpc:connected() of
-        true ->
-            mango_cursor_text;
-        false ->
-            ?MANGO_ERROR({index_service_unavailable, <<"text">>})
-    end.
+    ?MANGO_ERROR({index_service_unavailable, <<"text">>}).
 
 
 idx_mod(#idx{type = <<"json">>}) ->
@@ -276,12 +271,7 @@ idx_mod(#idx{type = <<"json">>}) ->
 idx_mod(#idx{type = <<"special">>}) ->
     mango_idx_special;
 idx_mod(#idx{type = <<"text">>}) ->
-    case clouseau_rpc:connected() of
-        true ->
-            mango_idx_text;
-        false ->
-            ?MANGO_ERROR({index_service_unavailable, <<"text">>})
-    end.
+    ?MANGO_ERROR({index_service_unavailable, <<"text">>}).
 
 
 db_to_name(Name) when is_binary(Name) ->
@@ -318,8 +308,7 @@ get_idx_type(Opts) ->
 
 
 is_text_service_available() ->
-    erlang:function_exported(clouseau_rpc, connected, 0) andalso
-        clouseau_rpc:connected().
+    false.
 
 
 get_idx_ddoc(Idx, Opts) ->