diff options
author | Jamu Kakar <jkakar@kakar.ca> | 2019-06-26 22:13:53 -0700 |
---|---|---|
committer | Jamu Kakar <jkakar@kakar.ca> | 2019-06-26 22:13:53 -0700 |
commit | 1aa2a26a341da05ff9420ac365b967b8be2d84a7 (patch) | |
tree | 98ae6f04dbe7db9937b9e3c78181448768d8fdaa | |
parent | d752e2787007991d59de143087bf9bafe47e0402 (diff) |
rebar3 dialyzer: Warn when debug_info is disable
-rw-r--r-- | src/rebar_prv_dialyzer.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl index 82b4012..500b591 100644 --- a/src/rebar_prv_dialyzer.erl +++ b/src/rebar_prv_dialyzer.erl @@ -474,6 +474,13 @@ proj_files(State) -> get_files(State, Apps, PltApps, [], PltMods). run_dialyzer(State, Opts, Output) -> + case debug_info(State) of + true -> + ok; + false -> + ?WARN("Add {erl_opts, [debug_info]} to rebar.config if Dialyzer fails to load Core Erlang.", []), + ok + end, %% dialyzer may return callgraph warnings when get_warnings is false case proplists:get_bool(get_warnings, Opts) of true -> @@ -539,6 +546,10 @@ get_config(State, Key, Default) -> Config = rebar_state:get(State, dialyzer, []), proplists:get_value(Key, Config, Default). +debug_info(State) -> + Config = rebar_state:get(State, erl_opts, []), + proplists:get_value(debug_info, Config, false). + -spec collect_nested_dependent_apps([atom()]) -> [atom()]. collect_nested_dependent_apps(RootApps) -> Deps = lists:foldl(fun collect_nested_dependent_apps/2, sets:new(), RootApps), |