moxley

moxley

Phoenix project doesn't use Dialyzer?

I noticed the Phoenix project doesn’t appear to have configuration for dialyzer. Running dialyzer against it produces many errors (I used some basic configuration from another project). Does Phoenix not use Dialyzer? And if not, is there a reason why?

Most Liked

ericmj

ericmj

Elixir Core Team

If it’s in CI it means contributors need to know about it or I have to fix the issues they introduce. I don’t think it’s worth it for myself either since there have, at least traditionally, been many errors that are not fixable in generated code and with protocols. Errors that we cant fix also makes CI practically useless since it will always fail. The effort is usually not worth the value it provides.

Dialyzer does not do what I want a type checker to do. In traditional type systems you write types and then verify the code against the types - the types are the contract. In dialyzer the code is the contract, dialyzer ignores the types and uses the code as single source of truth. After verifying the code without the help of user-given types it then checks the types against the code, but this is limited since it will only show an error if it can guarantee that the type does not match the types inferred from the code.

This is the correct behaviour of dialyzer because it should never reject valid code [1], but for me it makes it a lot less useful.

[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.62.3859&rep=rep1&type=pdf

ericmj

ericmj

Elixir Core Team

I can’t say why Phoenix isn’t using Dialyzer, but personally I feel like the value it provides does not outweigh the downsides it brings. Dialyzer makes it harder for contributors because it’s slow, the errors are hard to understand and you need knowledege of Erlang syntax to understand it.

I would rather get more contributors and have Phoenix more approachable to beginners than use Dialyzer.

Crowdhailer

Crowdhailer

Creator of Raxx

Interesting, as I was thinking of adding dialyzer to my project, with the hope of onbording contribute with more guide rails.

Last Post!

OvermindDL1

OvermindDL1

Yeah this I entirely agree with.

Where Next?

Popular in Discussions Top

CharlesO
Erlang :list.nth simple, but 1 - based nth(1, [H|_]) -> H; nth(N, [_|T]) when N > 1 -> nth(N - 1, T). Elixir Enum.at … coo...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement