Elixir - Dialyzer18 Mar 2019
MIX_HOME environment variable is not set Mix home defaults to ~/.mix/
but when using asdf it’s ~/.asdf/installs/elixir/1.8.1/.mix/ - this is where
core Erlang and Elixir PLT files are built.
mix dialyzer task is run for the first time:
- core Erlang and Elixir PLT files are built
- project environment specific PLT file is copied from core Elixir PLT file and then augmented with project modules
PLT files are rebuilt for each new version of Erlang or Elixir.
for some reason Dialyzer complains about Slime templates (probably it doesn’t recognize them) so I’ve opted just to ignore them:
# mix.exs def project do [ # ... - deps: deps() + deps: deps(), + dialyzer: [ + ignore_warnings: ".dialyzer_ignore.exs" + ] ] end
# .dialyzer_ignore.exs [ ~r/.*\.html\.slime.*/ ]
# mix.exs def project do [ # ... deps: deps(), dialyzer: [ + plt_add_deps: :transitive, ignore_warnings: ".dialyzer_ignore.exs" ] ] end
integration with ALE (Vim plugin)
dialyxir linter to the list of Elixir linters has no effect -
linter is run when file is saved but no issues are shown. I don’t want
to investigate it any further because running Dialyzer on each save is
quite costly IMO.