-
Notifications
You must be signed in to change notification settings - Fork 523
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
Add Lua global object server
as alias for redis
#136
Comments
server
as a alias for redis
(which we also keep)server
as alias for redis
Adding a new alias for the word |
I don't think it's a problem actually. Users can only create local variables. It's already possible to create a local variable called redis:
|
Yeah, you have to create local variables. Someone might already be creating a local server that would shadow the global variable, but that shouldn't break their script. It is a valid callout that some folks might need some soft refactoring if they were declaring a local server variable, which would shadow the global one. I don't see a concern. |
(Assigning it to me, although someone else from AWS is working on it. I'll update assignment when they join the triage group) |
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected. ``` [ok]: EVAL - is Lua able to call Redis API? (0 ms) [ok]: EVAL - is Lua able to call Server API? (1 ms) [ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms) [ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms) ``` --------- Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
…lkey-io#213) This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected. ``` [ok]: EVAL - is Lua able to call Redis API? (0 ms) [ok]: EVAL - is Lua able to call Server API? (1 ms) [ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms) [ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms) ``` --------- Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Fixed by #213 |
…lkey-io#213) This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected. ``` [ok]: EVAL - is Lua able to call Redis API? (0 ms) [ok]: EVAL - is Lua able to call Server API? (1 ms) [ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms) [ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms) ``` --------- Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
We shall also keep
redis
for backward compatibility.The text was updated successfully, but these errors were encountered: