-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
TysonAndre
pushed a commit
to TysonAndre/ioredis-mock
that referenced
this issue
Jul 15, 2022
In lua 5.2, the global function unpack was moved to table.unpack. Fixes stipsan#1193
TysonAndre
pushed a commit
to TysonAndre/ioredis-mock
that referenced
this issue
Jul 15, 2022
In lua 5.2, the global function unpack was moved to table.unpack. closes stipsan#1193
TysonAndre
pushed a commit
to TysonAndre/ioredis-mock
that referenced
this issue
Jul 15, 2022
In lua 5.2, the global function unpack was moved to table.unpack. closes stipsan#1193
stipsan
pushed a commit
to TysonAndre/ioredis-mock
that referenced
this issue
Jan 29, 2023
In lua 5.2, the global function unpack was moved to table.unpack. closes stipsan#1193
stipsan
pushed a commit
that referenced
this issue
Jan 29, 2023
Co-authored-by: Tyson Andre <tandre@themeetgroup.com> Fixes #1193
🎉 This issue has been resolved in version 8.2.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: