Now that the compiler is giving us some reporting about type mismatches, I’m wondering about people’s use of Dialyzer.
For anyone on Elixir 1.19+ who was already using Dialyzer:
- Yes, and getting value from it
- Yes, but not seeing the value from it
- No longer using it
- We use it at work but I don’t use it on my own projects
Edit: Added Poll
2 Likes
Before Elixir typechecker gets its function type annotations syntax, the main reason to still use Dialyzer is to be able to document interfaces with argument and return types, and have these contracts (at least partially) checked by Dialyzer
4 Likes
I use type specs in my personal projects and at work, but only as an additional piece of documentation.
Dialyzer is not present to validate this. In my experience it has never provided much value (never found a bug that was actually causing trouble) and requires a lot of handholding.
I hope that once the native Elixir type annotation syntax is released, it will be reasonably easy to convert from the current typespecs with some LLM assitance.
2 Likes
We use it, but I’ve wrapped incremental dialyzer from OPT26 into a new library assay | Hex that is much faster in CI. It also has slightly more readable errors/diffs. It may go away as Elixir’s own type checking improves, but there are still a lot of places where dialyzer uncovers real issues.
2 Likes
I do use it and get value out of it but it’s mostly about stale function contracts. On the rare occasion it also surfaces a possibility for a function raise instead of returning its contractual values i.e. the puzzling “function X has no local return” message.
Those two are valuable enough on their own so I still use Dialyzer.
1 Like