Dialyzex - an alternative Mix task for dialyzer

Thank you for your comments, Jeremy.

1 Like

Last week I updated dialyzex to use the “onion” PLT construction pattern described by James, meaning that the mix task will still build three PLTs, but they are no longer disjoint. To illustrate:

Old PLT contents New contents PLT location
Erlang/OTP Erlang/OTP $HOME/.cache/dialyzer/plts/erlang-20-erts-9.2.plt
Elixir Erlang/OTP + Elixir $HOME/.cache/dialyzer/plts/elixir-1.6.1-erlang-20-erts-9.2.plt
Project deps Erlang/OTP + Elixir + Project deps _build/dev/deps-N0rJXDclQ8d-ibrpSc_emw.plt

This should be nearly as fast as before when constructing PLTs, and the analysis phase seems unaffected.

Version 1.1.0 is available on Hex.

6 Likes

The package link should be https://hex.pm/packages/dialyzex

Great work!

2 Likes

Reading Dialyzer output should be a billable skill at this point. Adding a guide would be incredibly valuable for a LOT of people, be sure of it!

5 Likes

Can the mix task be run from inside child projects under an umbrella, as much as running from the umbrella?

Do you still maintain this library?

1 Like

Can the mix task be run from inside child projects under an umbrella, as much as running from the umbrella?

LIke any app under an umbrella, you’ll need dialyzex as an app dependency to run solely under that app.

Do you still maintain this library?

Yes.

1 Like

Any plans on incorporating Erlex for improved error messaging? Should be plug and play, and I’d be curious about any places where it is not.

1 Like

No. I applaud the effort, especially for the near-term wins it gives Elixir users. However, I have always envisioned that the way to do this properly is to modify both dialyzer and the libraries it relies upon to return abstract types and errors, rather than io_lib:format-ted ones. I have already started on a modification to erl_types, but it’s a long road.

1 Like

That was my idea, as well, but the Dialyzer code is intimidating and it wasn’t clear where such a thing would be plugged in. I would love to get the AST-formatted errors and completely deprecate my library.

4 Likes