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!

stefanchrobot

stefanchrobot

No. Too slow, too cryptic. Hoping for something like Gradualizer to be usable. In the meantime, I invest time in end to end tests.

eksperimental

eksperimental

I encourage everyone to start using Gradient, GitHub - esl/gradient: Gradient is a static typechecker for Elixir, and publishing issues with whatever you think it should be improved/fixed. I will help a lot to Gradient and Gradulizer itself to reach the point of maturity that still needs.

Where Next?

Popular in Polls Top

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
AstonJ
What is your primary dev OS? And is there any software you’d like to recommend that could make development easier? (Apart from the code e...
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
spicychickensauce
There are many v0 libraries in the elixir echo system, where at least officially, semantic versioning means nothing. However, it seems t...
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
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
ryanswapp
I think it would be interesting to see how most people are using Phoenix in production. Do you use it as an API backend for a SPA? Or do ...
New
AstonJ
After seeing some of the responses in this thread, I’m curious how much RAM you’re opting for and whether there is any specific reason fo...
New
axelson
I’m working on VSCode ElixirLs syntax highlighting, and different themes support different syntax definitions. So I am curious about whic...
New
AstonJ
The stereotype for ‘geeks’ is multiple monitors! But let’s see… poll
New

Other popular topics 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
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
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
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
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
_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
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New

We're in Beta

About us Mission Statement