diff options
author | Vlad Dumitrescu <vladdu55@gmail.com> | 2014-12-03 18:18:47 +0100 |
---|---|---|
committer | Vlad Dumitrescu <vladdu55@gmail.com> | 2015-04-02 16:53:24 +0200 |
commit | ae79184555445b43c8b6c7ff377c1e709f661391 (patch) | |
tree | ce162982814c70a81952a916d38f9186ab888213 /src/rebar_base_compiler.erl | |
parent | 99f85806787a03d45c3af09f3677f933037b31fe (diff) | |
download | rebar-ae79184555445b43c8b6c7ff377c1e709f661391.tar.gz |
compiler and xref respect 'keep_going' flag
Diffstat (limited to 'src/rebar_base_compiler.erl')
-rw-r--r-- | src/rebar_base_compiler.erl | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index d8569e7..c38fb11 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -152,11 +152,16 @@ compile_each([Unit | Rest], Config, CompileFn) -> skipped -> ?INFO("Skipped ~s\n", [unit_source(Unit)]); Error -> + maybe_report(Error), ?CONSOLE("Compiling ~s failed:\n", [maybe_absname(Config, unit_source(Unit))]), - maybe_report(Error), ?DEBUG("Compilation failed: ~p\n", [Error]), - ?FAIL + case rebar_config:get_xconf(Config, keep_going, false) of + false -> + ?FAIL; + true -> + ?WARN("Continuing after build error\n", []) + end end, compile_each(Rest, Config, CompileFn). @@ -180,11 +185,17 @@ compile_queue(Config, Pids, Targets) -> end; {fail, {_, {source, Source}}=Error} -> + maybe_report(Error), ?CONSOLE("Compiling ~s failed:\n", [maybe_absname(Config, Source)]), - maybe_report(Error), ?DEBUG("Worker compilation failed: ~p\n", [Error]), - ?FAIL; + case rebar_config:get_xconf(Config, keep_going, false) of + false -> + ?FAIL; + true -> + ?WARN("Continuing after build error\n", []), + compile_queue(Config, Pids, Targets) + end; {compiled, Unit, Warnings} -> report(Warnings), @@ -225,7 +236,12 @@ compile_worker(QueuePid, Config, CompileFn) -> compile_worker(QueuePid, Config, CompileFn); Error -> QueuePid ! {fail, {{error, Error}, {source, Source}}}, - ok + case rebar_config:get_xconf(Config, keep_going, false) of + false -> + ok; + true -> + compile_worker(QueuePid, Config, CompileFn) + end end; empty -> |