aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_worker.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-02-20 15:54:43 +0100
committerHenrik Nord <[email protected]>2012-05-21 15:31:19 +0200
commit009710cec5e8b9786a5219dc3f682d6010352160 (patch)
treedb8ad51ffea3f8287b36cc6e531e8495ccfe0b55 /lib/dialyzer/src/dialyzer_worker.erl
parent60e682897f98d9374b96c6324759f302170b2a17 (diff)
downloadotp-009710cec5e8b9786a5219dc3f682d6010352160.tar.gz
otp-009710cec5e8b9786a5219dc3f682d6010352160.tar.bz2
otp-009710cec5e8b9786a5219dc3f682d6010352160.zip
Parallel warning generation
Diffstat (limited to 'lib/dialyzer/src/dialyzer_worker.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_worker.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_worker.erl b/lib/dialyzer/src/dialyzer_worker.erl
index 48dae7cb56..6608b78f0a 100644
--- a/lib/dialyzer/src/dialyzer_worker.erl
+++ b/lib/dialyzer/src/dialyzer_worker.erl
@@ -64,7 +64,7 @@ launch(Mode, Job, Servers, Coordinator) ->
InitState =
case Mode of
X when X =:= 'typesig'; X =:= 'dataflow' -> initializing;
- 'compile' -> running
+ X when X =:= 'compile'; X =:= 'warnings' -> running
end,
spawn(fun() -> loop(InitState, State) end).
@@ -109,6 +109,10 @@ loop(running, #state{mode = 'compile'} = State) ->
Error
end,
report_to_coordinator(Result, State);
+loop(running, #state{mode = 'warnings'} = State) ->
+ ?debug("Warning: ~s\n",[State#state.job]),
+ Result = collect_warnings(State),
+ report_to_coordinator(Result, State);
loop(running, #state{mode = Mode} = State) when
Mode =:= 'typesig'; Mode =:= 'dataflow' ->
?debug("Run: ~p\n",[State#state.job]),
@@ -184,3 +188,6 @@ ask_coordinator_for_label(EstimatedSize, #state{coordinator = Coordinator}) ->
continue_compilation(Label, Data) ->
dialyzer_analysis_callgraph:continue_compilation(Label, Data).
+
+collect_warnings(#state{job = Job, servers = Servers}) ->
+ dialyzer_succ_typings:collect_warnings(Job, Servers).