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 2024/05/22 22:58:26 UTC
(couchdb) branch main updated: Enable Erlang/OTP 27
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
The following commit(s) were added to refs/heads/main by this push:
new 5b7eff7b2 Enable Erlang/OTP 27
5b7eff7b2 is described below
commit 5b7eff7b27030c3d37d6fbd94c02f08b7c2b301c
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed May 22 17:20:33 2024 -0400
Enable Erlang/OTP 27
* Update a few dependencies: jiffy, meck, etc.
* Don't use maybe as a type name, it's a reserved keyword
* Don't update map literals in a row, it now emits a warning
---
configure | 2 +-
rebar.config.script | 10 +++++-----
src/couch_scanner/include/couch_scanner_plugin.hrl | 2 +-
src/mango/src/mango.hrl | 2 +-
src/mango/src/mango_cursor_view.erl | 8 ++++----
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index ef6df36af..f327e8901 100755
--- a/configure
+++ b/configure
@@ -21,7 +21,7 @@ basename=`basename $0`
PACKAGE_AUTHOR_NAME="The Apache Software Foundation"
-REBAR3_BRANCH="3.21.0"
+REBAR3_BRANCH="3.23.0"
ERLFMT_VERSION="v1.3.0"
# TEST=0
diff --git a/rebar.config.script b/rebar.config.script
index 2460f531d..1927ada70 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -160,10 +160,10 @@ DepDescs = [
{tag, "v1.3.0"}, [raw]},
%% Third party deps
{hyper, "hyper", {tag, "CouchDB-2.2.0-7"}},
-{ibrowse, "ibrowse", {tag, "CouchDB-4.4.2-5"}},
-{jiffy, "jiffy", {tag, "CouchDB-1.0.9-2"}},
-{mochiweb, "mochiweb", {tag, "v3.2.1"}},
-{meck, "meck", {tag, "0.9.2"}},
+{ibrowse, "ibrowse", {tag, "CouchDB-4.4.2-6"}},
+{jiffy, "jiffy", {tag, "1.1.1"}},
+{mochiweb, "mochiweb", {tag, "v3.2.2"}},
+{meck, "meck", {tag, "CouchDB-0.9.2-1"}},
{recon, "recon", {tag, "2.5.3"}}
].
@@ -194,7 +194,7 @@ end.
AddConfig = [
{cover_enabled, true},
{cover_print_enabled, true},
- {require_otp_vsn, "24|25|26"},
+ {require_otp_vsn, "24|25|26|27"},
{deps_dir, "src"},
{deps, lists:map(MakeDep, DepDescs ++ OptionalDeps)},
{sub_dirs, SubDirs},
diff --git a/src/couch_scanner/include/couch_scanner_plugin.hrl b/src/couch_scanner/include/couch_scanner_plugin.hrl
index 8c7d20af6..76d7383d3 100644
--- a/src/couch_scanner/include/couch_scanner_plugin.hrl
+++ b/src/couch_scanner/include/couch_scanner_plugin.hrl
@@ -21,4 +21,4 @@
-define(WARN(FMT, ARGS), ?LOG(warning, FMT, ARGS, #{})).
-define(WARN(FMT, ARGS, META), ?LOG(warning, FMT, ARGS, META)).
-define(DEBUG(FMT, ARGS), ?LOG(debug, FMT, ARGS, #{fn => ?FUNCTION_NAME})).
--define(DEBUG(FMT, ARGS, META), ?LOG(debug, FMT, ARGS, META#{fn => ?FUNCTION_NAME})).
+-define(DEBUG(FMT, ARGS, META), ?LOG(debug, FMT, ARGS, maps:merge(META, #{fn => ?FUNCTION_NAME}))).
diff --git a/src/mango/src/mango.hrl b/src/mango/src/mango.hrl
index 6109bb081..dd185ebb5 100644
--- a/src/mango/src/mango.hrl
+++ b/src/mango/src/mango.hrl
@@ -22,7 +22,7 @@
-define(MANGO_ERROR(R), throw({mango_error, ?MODULE, R})).
--type maybe(A) :: A | undefined.
+-type possibly(A) :: A | undefined.
-type abstract_text_selector() :: {'op_and', [abstract_text_selector()]}
| {'op_or', [abstract_text_selector()]}
diff --git a/src/mango/src/mango_cursor_view.erl b/src/mango/src/mango_cursor_view.erl
index e42b14136..0928ae193 100644
--- a/src/mango/src/mango_cursor_view.erl
+++ b/src/mango/src/mango_cursor_view.erl
@@ -52,7 +52,7 @@
#{
selector => selector(),
fields => fields(),
- covering_index => 'maybe'(#idx{})
+ covering_index => possibly(#idx{})
}.
-type mrargs_extra_item() ::
@@ -67,7 +67,7 @@
-spec viewcbargs_new(Selector, Fields, CoveringIndex) -> ViewCBArgs when
Selector :: selector(),
Fields :: fields(),
- CoveringIndex :: 'maybe'(#idx{}),
+ CoveringIndex :: possibly(#idx{}),
ViewCBArgs :: viewcbargs().
viewcbargs_new(Selector, Fields, CoveringIndex) ->
#{
@@ -76,7 +76,7 @@ viewcbargs_new(Selector, Fields, CoveringIndex) ->
covering_index => CoveringIndex
}.
--spec viewcbargs_get(Key, Args) -> 'maybe'(term()) when
+-spec viewcbargs_get(Key, Args) -> possibly(term()) when
Key :: selector | fields | covering_index,
Args :: viewcbargs().
viewcbargs_get(selector, Args) when is_map(Args) ->
@@ -468,7 +468,7 @@ view_cb(ok, ddoc_updated) ->
-spec match_and_extract_doc(Doc, Selector, Fields) -> Result when
Doc :: ejson(),
Selector :: selector(),
- Fields :: 'maybe'(fields()),
+ Fields :: possibly(fields()),
Result :: {match, term()} | {no_match, undefined}.
match_and_extract_doc(Doc, Selector, Fields) ->
case mango_selector:match(Selector, Doc) of