iilyak commented on code in PR #5546:
URL: https://github.com/apache/couchdb/pull/5546#discussion_r2113978651
##########
src/dreyfus/src/clouseau_rpc.erl:
##########
@@ -285,6 +288,21 @@ analyze(Analyzer, Text) ->
version() ->
rpc({main, clouseau()}, version).
+-spec clouseau_major_vsn() -> null | binary() | throw({atom(), binary()}).
+clouseau_major_vsn() ->
+ case version() of
+ {ok, <<Major, _/binary>>} ->
+ <<Major>>;
+ {'EXIT', noconnection} ->
+ throw({noconnection, <<"Clouseau node is not connected.">>});
+ {ok, null} ->
+ %% Backward compatibility:
+ %% If we run Clouseau from source code, remsh will return
+ %% `{ok, null}` for Clouseau <= 2.25.0.
+ %% Related PR: https://github.com/cloudant-labs/clouseau/pull/106
+ null
Review Comment:
Thanks to Gabor and his PR now we know that only clouseau <= 2.25.0 can
return `null` (I don't think we should care about 1x). This means we can
hardcode
```
{ok, null} ->
$2
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]