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

喜夏-厌秋 提交于 2019-12-20 06:39:55

问题


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?


回答1:


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.




回答2:


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:

  • Issue Comment 271126643
  • Command line options


来源:https://stackoverflow.com/questions/39854839/dialyxir-mix-task-to-create-plt-exits-without-error-or-creating-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!