You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2025/04/18 10:29:21 UTC

(couchdb) 01/02: feat: support OTP 28, original patch by @rnewson

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

jan pushed a commit to branch feat/otp-28
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 322759922df442f0f56a092876b995ff15b07b5d
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Fri Apr 18 12:28:11 2025 +0200

    feat: support OTP 28, original patch by @rnewson
---
 rebar.config.script       | 2 +-
 src/config/src/config.erl | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/rebar.config.script b/rebar.config.script
index c9d7ecb9d..35bd17ee2 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -191,7 +191,7 @@ end.
 AddConfig = [
     {cover_enabled, true},
     {cover_print_enabled, true},
-    {require_otp_vsn, "25|26|27"},
+    {require_otp_vsn, "25|26|27|28"},
     {deps_dir, "src"},
     {deps, lists:map(MakeDep, DepDescs ++ OptionalDeps)},
     {sub_dirs, SubDirs},
diff --git a/src/config/src/config.erl b/src/config/src/config.erl
index bf8358d1d..695bc40b9 100644
--- a/src/config/src/config.erl
+++ b/src/config/src/config.erl
@@ -512,8 +512,10 @@ remove_comments(Line) ->
         NoLeadingComment when is_list(NoLeadingComment) ->
             % Check for in-line comments. In-line comments must be preceded by
             % space or a tab character.
-            [NoComments | _] = re:split(NoLeadingComment, " ;|\t;", [{return, list}]),
-            NoComments
+            case re:split(NoLeadingComment, " ;|\t;", [{return, list}]) of
+                [] -> [];
+                [NoComments | _] -> NoComments
+            end
     end.
 
 trim(String) ->