Open
Description
Building the current monolithic plt file for the first time tend to take much time.
As multiple plt files can be specified through --plts option,
Dividing the current plt file into the two one for APPS the other for LIBS allow us to reuse APPS on every repos and makes dialyzering fast.
diff --git a/apps/leo_gateway/Makefile b/apps/leo_gateway/Makefile
index 1843356..0baee9a 100644
--- a/apps/leo_gateway/Makefile
+++ b/apps/leo_gateway/Makefile
@@ -7,6 +7,7 @@ LIBS = deps/leo_commons/ebin deps/leo_logger/ebin deps/leo_object_storage/ebin \
deps/leo_s3_libs/ebin deps/leo_cache/ebin deps/leo_dcerl/ebin deps/leo_mcerl/ebin \
deps/savanna_commons/ebin deps/savanna_agent/ebin deps/erpcgen/ebin
PLT_FILE = .leo_gateway_dialyzer_plt
+COMMON_PLT_FILE = .common_dialyzer_plt
DOT_FILE = leo_gateway.dot
CALL_GRAPH_FILE = leo_gateway.png
@@ -26,13 +27,16 @@ release:
(cd rel/ && ../rebar generate)
check_plt:
@$(REBAR) compile
- dialyzer --check_plt --plt $(PLT_FILE) --apps $(APPS)
+ dialyzer --check_plt --plts $(PLT_FILE) $(COMMON_PLT_FILE) --apps $(APPS)
build_plt:
@$(REBAR) compile
- dialyzer --build_plt --output_plt $(PLT_FILE) --apps $(APPS) $(LIBS)
+ dialyzer --build_plt --output_plt $(PLT_FILE) --apps $(LIBS)
+build_plt_common:
+ @$(REBAR) compile
+ dialyzer --build_plt --output_plt $(COMMON_PLT_FILE) --apps $(APPS)
dialyzer:
@$(REBAR) compile
- dialyzer --plt $(PLT_FILE) -r ebin/ --dump_callgraph $(DOT_FILE) -Wrace_conditions | fgrep -v -f ./dialyzer.ignore-warnings
+ dialyzer --plts $(PLT_FILE) $(COMMON_PLT_FILE) -r ebin/ --dump_callgraph $(DOT_FILE) -Wrace_conditions | fgrep -v -f ./dialyzer.ignore-warnings
In the above example,
COMMON_PLT_FILE
can be reused across every repos.
5260