Skip to content

Commit

Permalink
Replace luafilesystem-ffi to fix build issue with arm64
Browse files Browse the repository at this point in the history
Fix aarch64 build
  • Loading branch information
tkan145 committed Feb 8, 2024
1 parent 49722c9 commit a34e36a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/man
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/lua-resty-env-0.4.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/liquid-0.2.0-2.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/tieske/date-2.2-2.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/tieske/penlight-1.7.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/tieske/penlight-1.13.1-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/mpeterv/argparse-0.6.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/lua-resty-execvp-0.1.1-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/luafilesystem-ffi-0.2.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/hisham/luafilesystem-1.8.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/lua-resty-jit-uuid-0.0.7-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/knyar/nginx-lua-prometheus-0.20181120-2.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/hamish/lua-resty-iputils-0.3.0-1.src.rock
Expand Down
3 changes: 1 addition & 2 deletions gateway/src/apicast/cli/command/generate.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local setmetatable = setmetatable

local filesystem = require('apicast.cli.filesystem')
local pl = require'pl.import_into'()
local Template = require('apicast.cli.template')

Expand Down Expand Up @@ -30,7 +29,7 @@ function _M.copy(source, destination, env, force)

local template = Template:new(env, source, true)

for filename in filesystem(source) do
for filename in pl.dir.dirtree(source) do
local path = template:interpret(pl.path.relpath(filename, source))

local fullpath = pl.path.join(destination, path)
Expand Down
3 changes: 1 addition & 2 deletions gateway/src/apicast/cli/template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ local ipairs = ipairs
local sub = string.sub
local len = string.len
local pack = table.pack
local fs = require('apicast.cli.filesystem')
local pl = { dir = require('pl.dir'), path = require('pl.path'), file = require('pl.file') }
local Liquid = require 'liquid'
local resty_env = require('resty.env')
Expand Down Expand Up @@ -84,7 +83,7 @@ local function dirtree(dir, cache)
return pairs(cached)
else
cache[dir] = {}
return fs(dir)
return pl.dir.dirtree(dir)

Check warning on line 86 in gateway/src/apicast/cli/template.lua

View check run for this annotation

Codecov / codecov/patch

gateway/src/apicast/cli/template.lua#L86

Added line #L86 was not covered by tests
end
end

Expand Down

0 comments on commit a34e36a

Please sign in to comment.