mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 11:09:55 +00:00
compiler and xref respect 'keep_going' flag
This commit is contained in:
parent
99f8580678
commit
ae79184555
2 changed files with 27 additions and 6 deletions
|
@ -152,11 +152,16 @@ compile_each([Unit | Rest], Config, CompileFn) ->
|
||||||
skipped ->
|
skipped ->
|
||||||
?INFO("Skipped ~s\n", [unit_source(Unit)]);
|
?INFO("Skipped ~s\n", [unit_source(Unit)]);
|
||||||
Error ->
|
Error ->
|
||||||
|
maybe_report(Error),
|
||||||
?CONSOLE("Compiling ~s failed:\n",
|
?CONSOLE("Compiling ~s failed:\n",
|
||||||
[maybe_absname(Config, unit_source(Unit))]),
|
[maybe_absname(Config, unit_source(Unit))]),
|
||||||
maybe_report(Error),
|
|
||||||
?DEBUG("Compilation failed: ~p\n", [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,
|
end,
|
||||||
compile_each(Rest, Config, CompileFn).
|
compile_each(Rest, Config, CompileFn).
|
||||||
|
|
||||||
|
@ -180,11 +185,17 @@ compile_queue(Config, Pids, Targets) ->
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{fail, {_, {source, Source}}=Error} ->
|
{fail, {_, {source, Source}}=Error} ->
|
||||||
|
maybe_report(Error),
|
||||||
?CONSOLE("Compiling ~s failed:\n",
|
?CONSOLE("Compiling ~s failed:\n",
|
||||||
[maybe_absname(Config, Source)]),
|
[maybe_absname(Config, Source)]),
|
||||||
maybe_report(Error),
|
|
||||||
?DEBUG("Worker compilation failed: ~p\n", [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} ->
|
{compiled, Unit, Warnings} ->
|
||||||
report(Warnings),
|
report(Warnings),
|
||||||
|
@ -225,7 +236,12 @@ compile_worker(QueuePid, Config, CompileFn) ->
|
||||||
compile_worker(QueuePid, Config, CompileFn);
|
compile_worker(QueuePid, Config, CompileFn);
|
||||||
Error ->
|
Error ->
|
||||||
QueuePid ! {fail, {{error, Error}, {source, Source}}},
|
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;
|
end;
|
||||||
|
|
||||||
empty ->
|
empty ->
|
||||||
|
|
|
@ -87,7 +87,12 @@ xref(Config, _) ->
|
||||||
|
|
||||||
case lists:member(false, [XrefNoWarn, QueryNoWarn]) of
|
case lists:member(false, [XrefNoWarn, QueryNoWarn]) of
|
||||||
true ->
|
true ->
|
||||||
?FAIL;
|
case rebar_config:get_xconf(Config, keep_going, false) of
|
||||||
|
false ->
|
||||||
|
?FAIL;
|
||||||
|
true ->
|
||||||
|
ok
|
||||||
|
end;
|
||||||
false ->
|
false ->
|
||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in a new issue