anthonator

anthonator

Suppress dialyzer error from library

Hey all!

I’m receiving this dialyzer error from a library and I’m not sure how to suppress it on my end.

lib/core/distributed_registry.ex:17:callback_type_mismatch
Type mismatch for @callback init/1 in Horde.Registry behaviour.

Expected type:
{:ok, Keyword.t()}

Actual type:

  :ignore
  | {:ok,
     {%{:intensity => _, :period => _, :strategy => _}, [any()]}
     | %{
         :delta_crdt_options => %{:max_sync_size => _, :shutdown => _, :sync_interval => _},
         :distribution_strategy => _,
         :keys => _,
         :listeners => _,
         :members => _,
         :meta => _
       }}
  | {:stop, {:bad_return, {atom(), :init, _}}}


________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

Thanks in advance!

Most Liked

al2o3cr

al2o3cr

Crossreferencing https://github.com/derekkraan/horde/issues/181 here for other readers.

We use Horde.Registry and have this same issue, ended up adding a .dialyzer_ignore.exs containing:

[
  {"path/from/your/error/message", :callback_type_mismatch, line_number_from_message}
]
anthonator

anthonator

Awesome! Thank you!

I ended up putting this at the top of my registry.

@dialyzer { :nowarn_function, init: 1 }
anthonator

anthonator

There’s only so much you can do if you don’t control the code. In this case a fix has been merged but not released.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New

We're in Beta

About us Mission Statement