Peter Saxton
Peter Saxton

Reputation: 4666

dialyxir mix task to create PLT exits without error or creating table

I am trying to use dialyxir to run dialyzer analysis on my project through the mix tasks it provides.

I have added it to my dependencies and compiled as per the README.

When I run the mix dialyxir.plt it reports no error and yet exits without creating the table.

$ mix dialyzer.plt
Starting PLT Core Build ... this will take awhile
dialyzer --build_plt --output_plt /home/vagrant/.dialyxir_core_19_1.3.2.plt --apps erts kernel stdlib crypto public_key -r /usr/local/lib/elixir/bin/../lib/elixir/../eex/ebin /usr/local/lib/elixir/bin/../lib/elixir/../elixir/ebin /usr/local/lib/elixir/bin/../lib/elixir/../ex_unit/ebin /usr/local/lib/elixir/bin/../lib/elixir/../iex/ebin /usr/local/lib/elixir/bin/../lib/elixir/../logger/ebin /usr/local/lib/elixir/bin/../lib/elixir/../mix/ebin
Creating PLT /home/vagrant/.dialyxir_core_19_1.3.2.plt ...

# later

$ ll /home/vagrant
# No file called /home/vagrant/.dialyxir_core_19_1.3.2.plt

# running the mix task errors as expected with no plt

$ mix dialyzer
dialyzer --no_check_plt --plt /home/vagrant/.dialyxir_core_19_1.3.2.plt -Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspecs /vagrant/_build/dev/lib/ace/ebin

dialyzer: No such file, directory or application: "/home/vagrant/.dialyxir_core_19_1.3.2.plt"

The question is how do i debug this?

Upvotes: 2

Views: 684

Answers (2)

noobninja
noobninja

Reputation: 910

mix dialyzer --plt

Command line option mix dialyxir.plt returns error as of dialyxir 0.4.3. Dot syntax replaced by flag added above.

References:

Upvotes: 2

Dogbert
Dogbert

Reputation: 222188

Like you mentioned in the comments, the complete error message when running dialyzer directly included the text Killed at the end. That's Linux's Out-of-memory killer killing the process for using too much resources (most likely RAM/swap) since the VM only had ~489MiB of RAM. dialyzer's PLT creation is pretty CPU/memory intensive, so increasing the RAM (to say 1 or 2GB) should fix this.

Upvotes: 4

Related Questions