Dialyzer / Dialyxer Clean Output

Hi Folks,

I am starting a brand-new Phoenix project, and I am trying to get a clean output from dialyzer. I am using dialyxir. I am using Erlang 18.3.4, Elixir 1.3.4, and Phoenix 1.2.1.

The output so far is relatively clean, though I do get the following two warnings:

index.html.eex:1: The pattern {'safe', _@2} can never match the type binary()
Unknown functions:
  'Elixir.Phoenix.LiveReloader':call/2
 done in 0m1.67s
done (warnings were emitted)

Is there anything I can do to clean-up this output? Again, I have done nothing more than ran mix phoenix.new hello_world, fetching dependencies, and adding dialyxir to the application.

P.S. Not completely relevant here, but the reason I am a bit obsessive about getting clean output is that I started a toy project w/o dialyxir (didn’t know about it at the time), and now I need to turn it into a professional project.

Thanks for any guidance.

1 Like

Check out this commit in my demo repo here and search for @dialyzer you will see what I needed to do to get a clean output (I thought I did this is a separate commit, but unfortunately not). I used this reference: https://github.com/jeremyjh/dialyxir/wiki/Phoenix-Dialyxir-Quickstart

HTH

1 Like

Also keep in mind that Live Reloader is a dev only thing. I would advise to run Dialyzer on prod environment. Especially in a pro environment.

1 Like

@nicholasjhenry Thanks for the reply. I was aware of that particular QuickStart guide, but wanted to avoid adding code unless it was necessary, but frankly I’ve played around with this too much already, and it helps to be reminded about what the author of the lib suggest.

Thanks!

@DianaOlympos Will do - thank you.

Any suggestions on how to do that without adding dialyxir as a prod dependency which it is definitively not?

1 Like

You could have a “staging” environment that is exactly the same as prod but used for CI ?

1 Like