Update dialyxir to get a much nicer UX; fix warnings
MODIFY
lib/kafka_ex.ex
lib/kafka_ex.ex
@@ -22,6 +22,8 @@ defmodule KafkaEx do
alias KafkaEx.Protocol.Produce.Message
alias KafkaEx.Protocol.SyncGroup.Request, as: SyncGroupRequest
alias KafkaEx.Protocol.SyncGroup.Response, as: SyncGroupResponse
+ alias KafkaEx.Protocol.CreateTopics.Request, as: CreateTopicsRequest
+ alias KafkaEx.Protocol.CreateTopics.Response, as: CreateTopicsResponse
alias KafkaEx.Server
alias KafkaEx.Stream
@@ -537,7 +539,7 @@ defmodule KafkaEx do
```
"""
- @spec create_topics(CreateTopics.Requests.t, Keyword.t) :: CreateTopics.Response.t
+ @spec create_topics([CreateTopicsRequest.t], Keyword.t) :: CreateTopicsResponse.t
def create_topics(requests, opts \\ []) do
worker_name = Keyword.get(opts, :worker_name, Config.default_worker)
timeout = Keyword.get(opts, :timeout, 4000)

MODIFY
lib/kafka_ex/protocol/create_topics.ex
lib/kafka_ex/protocol/create_topics.ex
@@ -88,7 +88,6 @@ defmodule KafkaEx.Protocol.CreateTopics do
replica_assignments |> map_encode(&encode_replica_assignment/1)
end
- @spec encode_replica_assignment(ReplicaAssignment.t) :: binary
defp encode_replica_assignment(replica_assignment) do
<< replica_assignment.partition :: 32-signed >> <>
replica_assignment.replicas |> map_encode(&(<< &1 :: 32-signed >>))

MODIFY
mix.exs
mix.exs
@@ -36,7 +36,7 @@ defmodule KafkaEx.Mixfile do
defp deps do
[
{:credo, "~> 0.8.10", only: :dev},
- {:dialyxir, "~> 0.5.1", only: :dev},
+ {:dialyxir, "~> 1.0.0-rc.3", only: :dev},
{:excoveralls, "~> 0.7", only: :test},
{:ex_doc, "~> 0.18", only: :dev},
{:snappy,

MODIFY
mix.lock
mix.lock
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"},
"certifi": {:hex, :certifi, "1.2.1", "c3904f192bd5284e5b13f20db3ceac9626e14eeacfbb492e19583cf0e37b22be", [:rebar3], [], "hexpm"},
"credo": {:hex, :credo, "0.8.10", "261862bb7363247762e1063713bb85df2bbd84af8d8610d1272cd9c1943bba63", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm"},
- "dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm"},
+ "dialyxir": {:hex, :dialyxir, "1.0.0-rc.3", "774306f84973fc3f1e2e8743eeaa5f5d29b117f3916e5de74c075c02f1b8ef55", [:mix], [], "hexpm"},
"dialyze": {:hex, :dialyze, "0.2.1", "9fb71767f96649020d769db7cbd7290059daff23707d6e851e206b1fdfa92f9d", [:mix], []},
"earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},

Update dialyxir to get a much nicer UX; fix warnings