fengari mocks lua 5.3 (table.unpack), while redis uses lua 5.1 (unpack): resulting in attempt to call a nil value (global 'unpack')
#1193
Labels
attempt to call a nil value (global 'unpack')
#1193
https://www.lua.org/pil/5.1.html has a pure lua polyfill for
unpack
that can be used.This can be declared alongside other functions declared in luaExecString in defineRedisObject in src/commands/defineCommand.js or
unpack = table.unpack
https://stackoverflow.com/questions/43192285/lua-5-3-unpacking
https://www.lua.org/manual/5.2/manual.html#8
The root cause seems to be that fengari targets lua 5.3 (fengari issue 176), and redis server is stuck on 5.1 for client backwards compatibility reasons (redis 7382))
unpack
is useful for variadic calls, e.g. to redis.callThe text was updated successfully, but these errors were encountered: