Dialyxir provides Elixir integration to the Erlang Dialyzer that ships in OTP. The simplest invocation is mix dialyzer
, which will perform a static type analysis of your project and produce warning messages. It also has many options for integrating into CI workflows; see the documentation for more.
There is an older thread where Dialyxir updates have been posted, but its been dormant for years, is ancient history and doesn’t meet the current guidelines for this category, so I’m starting a new one to have a thread for releases and updates.
1.4.4 was released today, with several improvements and fixes, most notably:
- @christhekeele has taken over maintenance of the dependency Erlex and added support for Elixir 1.16. Erlex is responsible for parsing and printing the code related to warning messages in Elixir, rather than Erlang and is critical to Dialyxir. Chris also made many improvements to the benefit of maintenance of that package going forward, and 1.4.4 now depends on this to ensure those fixes get out to everyone.
- @axelson Implemented support for multiple formatters, which allows you to do things like
mix dialyzer --format github --format dialyxir
in order to capture warnings in Github format and in human-readable format in a single invocation. - I fixed a bug related to formatting Invalid Contract warnings that has been present since OTP 26.
- Other contributors in this release include kianmeng, ProducerMatt, @sigu, and Inenad
While I’m very grateful for Chris stepping in to support Erlex, I’m very sad that it was necessary. Andrew Summers passed away suddenly in 2022. Andrew developed Erlex (originally in the Dialyxir repo, and later extracted to a library) and all the formatters that use it in Dialyxir. Dialyxir would not be what it is today without his support, and he put far more work into it over a few brief months than I have across the project’s lifetime.
There have been many other contributors over the years - to many to list - and the project simply would not exist without them. I’m very grateful also for all the advice and direction given by the community over the years, most particularly from @fishcakez .
I have to be honest though, I hope it does not remain useful for too much longer! I’m very excited about the work that Jose and team are doing on set-theoretic types - which began landing in 1.17. I believe this type system will solve many issues that simply cannot be solved in success typing and provide a development experience that is much improved for developers who take advantage of it.