Use Luerl 1.0 for Erlang 20, 1.1.1 for 21-26, and temporary fork for 27

The Luerl 1.1.0 and 1.1.1 hex packages contain garbage files that
break compilation with Erlang 20.
This commit is contained in:
Badlop 2024-02-16 19:38:50 +01:00
parent 5fb76b4918
commit a09f222b4c
2 changed files with 22 additions and 5 deletions

View File

@ -140,7 +140,10 @@ defmodule Ejabberd.MixProject do
{config(:sip), {:esip, "~> 1.0"}},
{config(:zlib), {:ezlib, "~> 1.0"}},
{if_version_below(~c"22", true), {:lager, "~> 3.9.1"}},
{config(:lua), {:luerl, "~> 1.0"}},
{config(:lua) and if_version_below(~c"27", true),
{:luerl, "~> 1.1.1"}},
{config(:lua) and if_version_above(~c"26", true),
{:luerl, git: "https://github.com/processone/luerl", branch: "otp27"}},
{config(:mysql), {:p1_mysql, ">= 1.0.23" }},
{config(:pgsql), {:p1_pgsql, "~> 1.1"}},
{config(:sqlite), {:sqlite3, "~> 1.1"}},

View File

@ -48,14 +48,28 @@
{if_version_below, "22",
{lager, ".*", {git, "https://github.com/erlang-lager/lager", {tag, "3.9.1"}}}
},
%% Lua, rebar, OTP 20: 1.0 git tag
{if_var_true, lua,
{if_not_rebar3,
{luerl, ".*", {git, "https://github.com/rvirding/luerl", {tag, "1.0"}}}
}},
{if_version_below, "21",
{luerl, ".*", {git, "https://github.com/rvirding/luerl", {tag, "1.0"}}}
}}},
%% Lua, rebar3, OTP 20: 1.0.0 hex package
{if_var_true, lua,
{if_rebar3,
{luerl, ".*", {git, "https://github.com/rvirding/luerl", {tag, "1.0.0"}}}
}},
{if_version_below, "21",
{luerl, ".*", {git, "https://github.com/rvirding/luerl", {tag, "1.0.0"}}}
}}},
%% Lua, any rebar, OTP 21-26: 1.1.1 git tag / 1.1.1 hex package
{if_var_true, lua,
{if_version_above, "20", {if_version_below, "27",
{luerl, ".*", {git, "https://github.com/rvirding/luerl", {tag, "1.1.1"}}}
}}},
%% Lua, any rebar, OTP 27: temporary otp27 branch from fork
{if_var_true, lua,
{if_version_above, "26",
{luerl, ".*", {git, "https://github.com/processone/luerl", {branch, "otp27"}}}
}},
{mqtree, ".*", {git, "https://github.com/processone/mqtree", {tag, "1.0.15"}}},
{p1_acme, ".*", {git, "https://github.com/processone/p1_acme", {tag, "1.0.22"}}},
{if_var_true, mysql,