Erlang: dialyzer is dead slowly for a large project

Scalaris Key Key Store is a large Erlang project with ~ 100 modules. I am introducing a new module as part of this project, and I am amazed at how long it takes for the dialyzer to perform one complete check of the project. Running make dialyzer takes about 200 seconds on my machine, which is unbearable for frequent testing when implementing changes.

make dialyzer runs the following command to start the dialyzer:

 /usr/lib/erlang/bin/dialyzer -Dtid_not_builtin -Dwith_export_type_support \ -DNO_FILE_SENDFILE -Dhave_cthooks_support -Dhave_callback_support \ -Werror_handling -Wrace_conditions -Wunmatched_returns -I include/ \ -I contrib/yaws/include/ -I contrib/log4erl/include/ \ --src -c src src/*/ test/unittest_helper.erl test/tester*.erl \ test/mockup*.erl test/erl_id_trans.erl \ test/measure_util.erl test/scalaris_cth.erl \ --no_native 

I assume that I should be able to include only the files needed for my module in the list of options for --src , but this list is probably quite large, and it comes down to including 90 files of a given 100. Is there a better way to speed up the dialyzer with the assumption that only one module will change between subsequent runs?

+4
source share
1 answer

If the other modules do not have calls in the changing module, you can add them to the PLT and they will not be checked every time. However, if they have calls, there is no way to make sure that the results of these calls will be the same if you change the code in a changing module.

 dialyzer --add_to_plt <unchanged modules> 

If you have a multi-core computer, you can also use Erlang R15B02 (not released at the time I am writing this, but available for building in the "maint" branch https://github.com/erlang/otp ), which has a parallel version Dialyzer

+3
source

All Articles