From 149f80656f1d7c30331f37f68a2a601cd2870d8f Mon Sep 17 00:00:00 2001 From: Nick Vatamaniuc Date: Sun, 7 Jun 2026 00:02:27 -0400 Subject: [PATCH 1/2] OTP 29 Support In OTP 29 catch statements started to throw deprecation warnings, and since we're using `warnings_as_errors` our compilation fails. The catch construct hasn't been scheduled for removal yet [1] so for now just to compile ibrowse add a per-module compiler directive. This allows catch rewrites to be done incrementally module-by-module eventually. This is an intermediate alternative for https://github.com/cmullaparthi/ibrowse/pull/187 for now. [1] https://www.erlang.org/doc/scheduled_for_removal.html --- .github/workflows/ci.yml | 3 ++- src/ibrowse.erl | 3 +++ src/ibrowse_http_client.erl | 3 +++ src/ibrowse_lb.erl | 3 +++ src/ibrowse_lib.erl | 2 ++ test/ibrowse_load_test.erl | 3 +++ test/ibrowse_test.erl | 2 ++ test/ibrowse_test_server.erl | 3 +++ 8 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bfd6ea..e135999 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,13 @@ jobs: os: - ubuntu-latest otp: + - "29" - "28" - "27" - "26" - "25" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: make - run: make unit_tests diff --git a/src/ibrowse.erl b/src/ibrowse.erl index f0ea1dc..804fcad 100644 --- a/src/ibrowse.erl +++ b/src/ibrowse.erl @@ -54,6 +54,9 @@ -module(ibrowse). -behaviour(gen_server). + +-compile(nowarn_deprecated_catch). + %%-------------------------------------------------------------------- %% Include files %%-------------------------------------------------------------------- diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl index 82fc62e..621aba9 100644 --- a/src/ibrowse_http_client.erl +++ b/src/ibrowse_http_client.erl @@ -7,6 +7,9 @@ %%%------------------------------------------------------------------- -module(ibrowse_http_client). -behaviour(gen_server). + +-compile(nowarn_deprecated_catch). + %%-------------------------------------------------------------------- %% Include files %%-------------------------------------------------------------------- diff --git a/src/ibrowse_lb.erl b/src/ibrowse_lb.erl index 894d8ad..44fc7c2 100644 --- a/src/ibrowse_lb.erl +++ b/src/ibrowse_lb.erl @@ -8,6 +8,9 @@ -module(ibrowse_lb). -author(chandru). -behaviour(gen_server). + +-compile(nowarn_deprecated_catch). + %%-------------------------------------------------------------------- %% Include files %%-------------------------------------------------------------------- diff --git a/src/ibrowse_lib.erl b/src/ibrowse_lib.erl index 889e996..68af889 100644 --- a/src/ibrowse_lib.erl +++ b/src/ibrowse_lib.erl @@ -10,6 +10,8 @@ -compile(export_all). -endif. +-compile(nowarn_deprecated_catch). + -include("ibrowse.hrl"). -ifdef(EUNIT). diff --git a/test/ibrowse_load_test.erl b/test/ibrowse_load_test.erl index dc4813a..6b6fbe2 100644 --- a/test/ibrowse_load_test.erl +++ b/test/ibrowse_load_test.erl @@ -1,5 +1,8 @@ -module(ibrowse_load_test). %%-compile(export_all). + +-compile(nowarn_deprecated_catch). + -export([ start/3, query_state/0, diff --git a/test/ibrowse_test.erl b/test/ibrowse_test.erl index 44f0ca5..2d6336a 100644 --- a/test/ibrowse_test.erl +++ b/test/ibrowse_test.erl @@ -50,6 +50,8 @@ -include_lib("ibrowse/include/ibrowse.hrl"). +-compile(nowarn_deprecated_catch). + %%------------------------------------------------------------------------------ %% Unit Tests %%------------------------------------------------------------------------------ diff --git a/test/ibrowse_test_server.erl b/test/ibrowse_test_server.erl index 7a5bb01..2faed2a 100644 --- a/test/ibrowse_test_server.erl +++ b/test/ibrowse_test_server.erl @@ -4,6 +4,9 @@ %%% Created : 17 Oct 2010 by Chandrashekhar Mullaparthi -module(ibrowse_test_server). + +-compile(nowarn_deprecated_catch). + -export([ start_server/0, start_server/2, From 78e4bf4a8cb9208f0e021edf3a159e54ce099b5a Mon Sep 17 00:00:00 2001 From: Nick Vatamaniuc Date: Sat, 13 Jun 2026 16:20:29 -0400 Subject: [PATCH 2/2] Make unit testing path independent of checkout path When vendoring this dependency it may not be called `ibrowse` when checked out (as is in the case of CouchDB, where it's called couchdb-ibrowse). Then the CI would break because `../../ibrowse/ebin` wouldn't exist. To make it work as any directory name just use a single `../` path and when including in test use `../`. --- Makefile | 2 +- test/Makefile | 2 +- test/ibrowse_test.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ff4c2d..b2af0f8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PROJECT=ibrowse PLT_APPS=erts kernel stdlib ssl crypto public_key -TEST_ERLC_OPTS=-pa ../ibrowse/ebin +TEST_ERLC_OPTS=-pa ebin include erlang.mk diff --git a/test/Makefile b/test/Makefile index 50a292c..34c580d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,4 +1,4 @@ -IBROWSE_EBIN_PATH=../../ibrowse/ebin +IBROWSE_EBIN_PATH=../ebin compile: @erl -pa $(IBROWSE_EBIN_PATH) -make diff --git a/test/ibrowse_test.erl b/test/ibrowse_test.erl index 2d6336a..0411fd9 100644 --- a/test/ibrowse_test.erl +++ b/test/ibrowse_test.erl @@ -48,7 +48,7 @@ socks5_auth_fail/0 ]). --include_lib("ibrowse/include/ibrowse.hrl"). +-include("../include/ibrowse.hrl"). -compile(nowarn_deprecated_catch).