Skip to content

Commit 64c61df

Browse files
committed
Warn on boot for OTP28.0 (#14732)
1 parent 4363dff commit 64c61df

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
include:
29-
- otp_version: "28.0"
29+
- otp_version: "28.1"
3030
deterministic: true
31-
- otp_version: "28.0"
31+
- otp_version: "28.1"
3232
erlc_opts: "warnings_as_errors"
3333
coverage: true
34-
- otp_version: "28.0"
34+
- otp_version: "28.1"
3535
otp_latest: true
3636
erlc_opts: "warnings_as_errors"
3737
- otp_version: "27.3"
@@ -106,7 +106,7 @@ jobs:
106106
name: Windows Server 2019, Erlang/OTP ${{ matrix.otp_version }}
107107
strategy:
108108
matrix:
109-
otp_version: ["26.2", "27.3", "28.0"]
109+
otp_version: ["26.2", "27.3", "28.1"]
110110
runs-on: windows-2022
111111
steps:
112112
- name: Configure Git

lib/elixir/src/elixir.erl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ parse_otp_release() ->
128128
%% Whenever we change this check, we should also change Makefile.
129129
case string:to_integer(erlang:system_info(otp_release)) of
130130
{Num, _} when Num >= 26 ->
131+
case Num == 28 andalso (code:ensure_loaded(re) == {module, re}) andalso not erlang:function_exported(re, import, 1) of
132+
true ->
133+
io:format(standard_error,
134+
"warning! Erlang/OTP 28.0 detected.~n"
135+
"Regexes will be re-compiled from source at runtime, which will cause degraded performance.~n"
136+
"This can be fixed by using Erlang OTP 28.1+ or 27-.~n"
137+
, []);
138+
false ->
139+
ok
140+
end,
131141
Num;
132142
_ ->
133143
io:format(standard_error, "ERROR! Unsupported Erlang/OTP version, expected Erlang/OTP 26+~n", []),

0 commit comments

Comments
 (0)