Skip to content
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

Fix type spec #83

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Fix type spec #83

merged 3 commits into from
Aug 16, 2024

Conversation

s4rd3d
Copy link

@s4rd3d s4rd3d commented Aug 9, 2024

The eredis:q/2 function can return a list of empty lists when executing a MULTI command.

Minimal example to reproduce:

> {ok, Client} = eredis:start_link(localhost, 6379, 0, "redis-password").
{ok,<0.2978.0>}
> eredis:q(Client, ["MULTI"]).
{ok,<<"OK">>}
> eredis:q(Client, ["ZRANGE", <<"non-existent-key">>, 0, 0]).
{ok,<<"QUEUED">>}
> eredis:q(Client, ["ZRANGE", <<"non-existent-key">>, -1, -1]).
{ok,<<"QUEUED">>}
> eredis:q(Client, ["EXEC"]).
{ok,[[],[]]}

David Sandor added 2 commits August 9, 2024 10:59
The `eredis:q/2` function can return a list of empty lists when
executing a `MULTI` command.

Minimal example to reproduce:

```
> {ok, Client} = eredis:start_link(localhost, 6379, 0, "redis-password").
{ok,<0.2978.0>}
> eredis:q(Client, ["MULTI"]).
{ok,<<"OK">>}
> eredis:q(Client, ["ZRANGE", <<"non-existent-key">>, 0, 0]).
{ok,<<"QUEUED">>}
> eredis:q(Client, ["ZRANGE", <<"non-existent-key">>, -1, -1]).
{ok,<<"QUEUED">>}
> eredis:q(Client, ["EXEC"]).
{ok,[[],[]]}
```
doc/eredis.md Outdated
@@ -53,7 +53,7 @@ obfuscated() = fun(() -&gt; iodata())


<pre><code>
option() = {host, string() | {local, string()}} | {port, <a href="https://www.erlang.org/doc/man/inet.html#type-port_number">inet:port_number()</a>} | {database, integer()} | {username, iodata() | <a href="#type-obfuscated">obfuscated()</a> | undefined} | {password, iodata() | <a href="#type-obfuscated">obfuscated()</a> | undefined} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="https://www.erlang.org/doc/man/ssl.html#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {username, iodata() | <a href="#type-obfuscated">obfuscated()</a> | undefined} | {password, iodata() | <a href="#type-obfuscated">obfuscated()</a> | undefined} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened here? These links will not work anymore.
How did you update this file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran make edoc as it was instructed in the contributing document. I think I was using and older rebar / Erlang version. I rerun make edoc with rebar 3.23.0 on Erlang/OTP 25 Erts 13.0, it looks okay now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok.

I guess we need to change something to make it work correctly with newer versions. If you find out how, please let me know.

@zuiderkwast zuiderkwast merged commit a4fba8a into Nordix:master Aug 16, 2024
12 checks passed
@zuiderkwast
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants