From 17d10b041f021c18da2fcca3557e28aaae58a45e Mon Sep 17 00:00:00 2001 From: Michele Righi Date: Fri, 29 Nov 2024 00:56:12 +0100 Subject: [PATCH] feat: update PCRE dependency to lrexlib-pcre2 (#163) * feat: upgrade to lrexlib-pcre2 - update rockspec dependency - update rockspec template - rex_pcre2 Fixes #156 * ci: install correct dependencies for PCRE2 --- .github/luarocks-template.rockspec | 2 +- .github/workflows/build.yml | 4 ++-- casbin-1.41.1-1.rockspec | 2 +- src/util/BuiltInFunctions.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/luarocks-template.rockspec b/.github/luarocks-template.rockspec index c028eb6..2888f49 100644 --- a/.github/luarocks-template.rockspec +++ b/.github/luarocks-template.rockspec @@ -15,7 +15,7 @@ description = { dependencies = { "lua >= 5.1", "lualogging >= 1.5.1", - "lrexlib-pcre >= 2.9.1", + "lrexlib-pcre2 >= 2.9.2", "luaposix = 35.1-1" } build = { diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc0aea1..54cea7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: do sleep 1 done - until luarocks install lrexlib-pcre + until luarocks install lrexlib-pcre2 do sleep 1 done @@ -109,7 +109,7 @@ jobs: - name: Install dependencies run: | luarocks install lualogging - luarocks install lrexlib-pcre + luarocks install lrexlib-pcre2 luarocks install luaposix luarocks install luasocket luarocks install busted diff --git a/casbin-1.41.1-1.rockspec b/casbin-1.41.1-1.rockspec index 3943e13..2550805 100644 --- a/casbin-1.41.1-1.rockspec +++ b/casbin-1.41.1-1.rockspec @@ -17,7 +17,7 @@ description = { dependencies = { "lua >= 5.1", "lualogging >= 1.5.1", - "lrexlib-pcre >= 2.9.1", + "lrexlib-pcre2 >= 2.9.2", "luaposix = 35.1-1" } build = { diff --git a/src/util/BuiltInFunctions.lua b/src/util/BuiltInFunctions.lua index 5c51310..16b0f4a 100644 --- a/src/util/BuiltInFunctions.lua +++ b/src/util/BuiltInFunctions.lua @@ -12,7 +12,7 @@ --See the License for the specific language governing permissions and --limitations under the License. -local rex = require ("rex_pcre") +local rex = require ("rex_pcre2") local posix = require("posix.fnmatch") local BuiltInFunctions = {}