AstonJ

AstonJ

Do you use Dialyzer in your projects?

Do you use Dialyzer/Dialyxir in your Elixir projects?

Do you use Dialyzer in your projects?
  • Yes - all of them
  • Yes - some of them
  • No
0 voters
  • If you only use it in some of them, which ones?
  • If you don’t use it, why not?
  • If you do, any thoughts or experiences you’d like to share?

Most Liked

chrismccord

chrismccord

Creator of Phoenix

Dialyzer as it exists today is a net negative value add for me. I only use it if forced. In principle it checks out, but in practice it always costs more than it saves.

mattludwigs

mattludwigs

I use it everywhere and all the time. After 6 years of full time Elixir I think it’s one of the most underrated tools available to us. I think dialyzer is only as good as you use it. More (and better) the types, the better it works. I think when it’s sprinkled in a code base and the type definitions aren’t very clear (like using any, term, keyword, and map types) most places the tool doesn’t really help. Being really clear in the typing and use of type docs also provides a benefit to the documentation of the code and even that provides longer lasting benefits to maintenance over time. It’s one of those tools where you get out of it what you put in IMO. It’s not perfect in developer experience but it has provided me massive value over the years. Drop me into a Elixir project with very little to no types I’d probably struggle, I am not smart enough to not use types in my code base.

Qqwy

Qqwy

TypeCheck Core Team

As someone who is working a lot with Typespecs, for instance while working on the library TypeCheck, here’s some of the struggles I have with using Dialyzer:

  • Adding it into any project of reasonable size is slow, sometimes unsustainably so.
  • When it reports a problem, it is often very unclear why it is caused, and even moreso how it might be fixed. For example, help with this long-standing ‘function call with opaqueness mitchmatch’ problem would be greatly appreciated.
  • Elixir’s standard library itself does not follow Dialyzer’s opaqueness rules correctly, and fixing this would be a difficult and backwards-incompatible change. Essentially this means that pattern-matching on “pattern matching on the struct name allowed” structs like MapSets will make Dialyzer complain about usage which is recommended by Elixir’s official documentation. (Source: elixir/#8463 and elixir/#8480)

However, I still use it regularly, especially on smaller and simpler projects. I like the ‘belt ánd suspenders’ kind of approach w.r.t. detecting potential bugs early.
And as @eksperimental already noted: Gradient/Gradualizer is a wonderful new project, and very much worth keeping check on!

Where Next?

Popular in Polls Top

axelson
I’m working on VSCode ElixirLs syntax highlighting, and different themes support different syntax definitions. So I am curious about whic...
New
arcanemachine
This was the first question on my mind when I saw this other thread by @AstonJ. I’m curious how many Phoenix users actually like using T...
New
AstonJ
Polls are a great way to easily get a snapshot of things, and we’ve had some really interesting polls over the years! Here are some tips...
New
AstonJ
Following on from a conversation in the Tidewave thread - how useful do you think AI dev tools are right now and how useful do you think ...
New
AstonJ
I think I’ve used LittleSnitch since my first ever Mac - does anyone else use it or whatever the equivalent is on your OS? What does it ...
New
JEG2
Which topics would you most like to see covered in downloadable Livebook guides (like the How to Train Your Scrappy Programmer series I r...
New
hst337
Do you use hot-reload/recompilation in production? Please note that this poll is only about BEAM’s internal features of runtime upgrades ...
New
AstonJ
How often do you buy a new dev machine? poll If there is any particular reason why you’ve settled on the frequency you have, please shar...
New
AstonJ
Curious how much people are paying for hosting of their Elixir (or other BEAM lang) apps :smiley: The poll is anonymous so if you can ge...
New
josefrichter
There are two polls and a third question… 1) Displays poll 2) Orientation poll 3) Configuration Please let us know how you are using you...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
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
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement