summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralisdair sullivan <alisdair.sullivan@askuity.com>2015-10-26 09:44:49 -0700
committeralisdair sullivan <alisdairsullivan@yahoo.ca>2015-10-26 21:57:32 -0700
commit3bf52241bda6130b0dfc2c18e21f16bb205781d4 (patch)
tree56299ba2a7c283db5e467ef11568c8a5b1c81785
parentd1409d0b3b2f7fe5c491f866ef983dd7df7d0f42 (diff)
restore debug calls to `rebar_erlc_compiler` and `rebar_prv_eunit`
-rw-r--r--src/rebar_erlc_compiler.erl16
-rw-r--r--src/rebar_prv_eunit.erl4
2 files changed, 11 insertions, 9 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 5075f0f..57b7387 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -92,13 +92,13 @@
%% @equiv compile(AppInfo, []).
-spec compile(rebar_app_info:t()) -> ok.
-compile(AppInfo) when is_tuple(AppInfo), element(1, AppInfo) == app_info_t ->
+compile(AppInfo) when element(1, AppInfo) == app_info_t ->
compile(AppInfo, []).
%% @doc compile an individual application.
-spec compile(rebar_app_info:t(), compile_opts()) -> ok.
-compile(AppInfo, CompileOpts) when is_tuple(AppInfo), element(1, AppInfo) == app_info_t ->
+compile(AppInfo, CompileOpts) when element(1, AppInfo) == app_info_t ->
Dir = ec_cnv:to_list(rebar_app_info:out_dir(AppInfo)),
RebarOpts = rebar_app_info:opts(AppInfo),
@@ -139,7 +139,7 @@ compile(AppInfo, CompileOpts) when is_tuple(AppInfo), element(1, AppInfo) == app
%% directory of those src_dirs
-spec compile(rebar_dict() | rebar_state:t(), file:name(), file:name()) -> ok.
-compile(State, BaseDir, OutDir) when is_tuple(State), element(1, State) == state_t ->
+compile(State, BaseDir, OutDir) when element(1, State) == state_t ->
compile(rebar_state:opts(State), BaseDir, OutDir, [{recursive, false}]);
compile(RebarOpts, BaseDir, OutDir) ->
compile(RebarOpts, BaseDir, OutDir, [{recursive, false}]).
@@ -147,7 +147,7 @@ compile(RebarOpts, BaseDir, OutDir) ->
%% @hidden
-spec compile(rebar_dict() | rebar_state:t(), file:name(), file:name(), compile_opts()) -> ok.
-compile(State, BaseDir, OutDir, CompileOpts) when is_tuple(State), element(1, State) == state_t ->
+compile(State, BaseDir, OutDir, CompileOpts) when element(1, State) == state_t ->
compile(rebar_state:opts(State), BaseDir, OutDir, CompileOpts);
compile(RebarOpts, BaseDir, OutDir, CompileOpts) ->
SrcDirs = lists:map(fun(SrcDir) -> filename:join(BaseDir, SrcDir) end,
@@ -166,7 +166,7 @@ compile(RebarOpts, BaseDir, OutDir, CompileOpts) ->
%% @equiv compile_dirs(Context, BaseDir, [Dir], Dir, [{recursive, false}]).
-spec compile_dir(rebar_dict() | rebar_state:t(), file:name(), file:name()) -> ok.
-compile_dir(State, BaseDir, Dir) when is_tuple(State), element(1, State) == state_t ->
+compile_dir(State, BaseDir, Dir) when element(1, State) == state_t ->
compile_dir(rebar_state:opts(State), BaseDir, Dir, [{recursive, false}]);
compile_dir(RebarOpts, BaseDir, Dir) ->
compile_dir(RebarOpts, BaseDir, Dir, [{recursive, false}]).
@@ -174,7 +174,7 @@ compile_dir(RebarOpts, BaseDir, Dir) ->
%% @equiv compile_dirs(Context, BaseDir, [Dir], Dir, Opts).
-spec compile_dir(rebar_dict() | rebar_state:t(), file:name(), file:name(), compile_opts()) -> ok.
-compile_dir(State, BaseDir, Dir, Opts) when is_tuple(State), element(1, State) == state_t ->
+compile_dir(State, BaseDir, Dir, Opts) when element(1, State) == state_t ->
compile_dirs(rebar_state:opts(State), BaseDir, [Dir], Dir, Opts);
compile_dir(RebarOpts, BaseDir, Dir, Opts) ->
compile_dirs(RebarOpts, BaseDir, [Dir], Dir, Opts).
@@ -186,14 +186,16 @@ compile_dir(RebarOpts, BaseDir, Dir, Opts) ->
[file:filename()],
file:filename(),
compile_opts()) -> ok.
-compile_dirs(State, BaseDir, Dirs, OutDir, CompileOpts) when is_tuple(State), element(1, State) == state_t ->
+compile_dirs(State, BaseDir, Dirs, OutDir, CompileOpts) when element(1, State) == state_t ->
compile_dirs(rebar_state:opts(State), BaseDir, Dirs, OutDir, CompileOpts);
compile_dirs(RebarOpts, BaseDir, SrcDirs, OutDir, Opts) ->
CompileOpts = parse_opts(Opts),
ErlOpts = rebar_opts:erl_opts(RebarOpts),
+ ?DEBUG("erlopts ~p", [ErlOpts]),
Recursive = CompileOpts#compile_opts.recursive,
AllErlFiles = gather_src(SrcDirs, Recursive),
+ ?DEBUG("files to compile ~p", [AllErlFiles]),
%% Make sure that outdir is on the path
ok = filelib:ensure_dir(filename:join(OutDir, "dummy.beam")),
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl
index 71a1063..f12ab01 100644
--- a/src/rebar_prv_eunit.erl
+++ b/src/rebar_prv_eunit.erl
@@ -77,8 +77,8 @@ do(State, Tests) ->
run_tests(State, Tests) ->
T = translate_paths(State, Tests),
EUnitOpts = resolve_eunit_opts(State),
- ?INFO("eunit_tests ~p", [T]),
- ?INFO("eunit_opts ~p", [EUnitOpts]),
+ ?DEBUG("eunit_tests ~p", [T]),
+ ?DEBUG("eunit_opts ~p", [EUnitOpts]),
Result = eunit:test(T, EUnitOpts),
ok = maybe_write_coverdata(State),
case handle_results(Result) of