Making dialyxir _and_ dialyzex available in mix?

I’ve been using dialyxir pretty heavily for a while, but I only recently learned about dialyzex. I now have both installed as dependencies, but I’m not sure how to make them both available for use under Mix.

The dialyxir docs say to run it as mix dialyzer. The dialyzex docs don’t seem to say, but it appears to take over the same command. So, the name is overloaded somewhere in Mix. I assume that there’s a way to get around this problem, but I can’t find anything that seems relevant in the docs. Help?

-r

You can’t get around that.

Both document to use mix dialyzer.

That means, bot implement a module Mix.Tasks.Dialyzer, whichever is used depends on the order of items in erlangs module load path, which is created by dialyzer dynamically depending on the built dependencies.

And to be honest, why do you want to use 2 different dialyzer wrapper? Both seem to give you roughly the same config (but with different names), except for dialyxir converting errors to elixir syntax (assuming an RC).

At the end you need neither, in theory you could drop into iex and call some functions on your own to run dialyzer as dialyzer itself is part of the erlang distribution.

I want to compare and contrast their results, in case each had benefits. Of course, I can do that by commenting out one or the other, but I really hoped there would be a cleaner workaround. Owell.

There shouldn’t be any difference at all, as both use dialyzer under the hood.

If there are any difference in the output they are either sugar around dialyzers raw warnings or discrepancies between configuration between both wrappers.

2 Likes