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 in brod_transaction #590

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

indrekj
Copy link
Contributor

@indrekj indrekj commented Jul 1, 2024

brod:transaction spec is:

-spec transaction(client(), transactional_id(), transaction_config()) -> {ok, transaction()}.

and brod_transaction:init also has:

init({Client, TxId, PropListConfig}) ->
  ClientPid = pid(Client),

but new and start_link were expecting only a pid. The client() spec itself is:

-type client() :: client_id() | pid().

`brod:transaction` spec is:

```erlang
-spec transaction(client(), transactional_id(), transaction_config()) -> {ok, transaction()}.
```

and brod_transaction:init also has:

```erlang
init({Client, TxId, PropListConfig}) ->
  ClientPid = pid(Client),
```

but new and start_link were expecting only a pid. The client() spec
itself is:

```erlang
-type client() :: client_id() | pid().
```
@zmstone zmstone merged commit f8aec1a into kafka4beam:master Jul 2, 2024
14 checks passed
@zmstone
Copy link
Contributor

zmstone commented Jul 2, 2024

Thank you for the PR @indrekj

@indrekj indrekj deleted the spec-fix branch July 2, 2024 09:51
@zmstone
Copy link
Contributor

zmstone commented Aug 12, 2024

thank you. this is included in 4.1.0

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