mirror of
https://github.com/correl/rebar.git
synced 2024-11-14 19:19:30 +00:00
Remove useless compile/3
Its case statement is noop.
This commit is contained in:
parent
eb79622903
commit
f61ca47b23
1 changed files with 2 additions and 13 deletions
|
@ -129,21 +129,10 @@ remove_common_path1([Part | RestFilename], [Part | RestPath]) ->
|
||||||
remove_common_path1(FilenameParts, _) ->
|
remove_common_path1(FilenameParts, _) ->
|
||||||
filename:join(FilenameParts).
|
filename:join(FilenameParts).
|
||||||
|
|
||||||
|
|
||||||
compile(Unit, Config, CompileFn) ->
|
|
||||||
case CompileFn(Unit, Config) of
|
|
||||||
ok ->
|
|
||||||
ok;
|
|
||||||
skipped ->
|
|
||||||
skipped;
|
|
||||||
Error ->
|
|
||||||
Error
|
|
||||||
end.
|
|
||||||
|
|
||||||
compile_each([], _Config, _CompileFn) ->
|
compile_each([], _Config, _CompileFn) ->
|
||||||
ok;
|
ok;
|
||||||
compile_each([Unit | Rest], Config, CompileFn) ->
|
compile_each([Unit | Rest], Config, CompileFn) ->
|
||||||
case compile(Unit, Config, CompileFn) of
|
case CompileFn(Unit, Config) of
|
||||||
ok ->
|
ok ->
|
||||||
?CONSOLE("Compiled ~s\n", [unit_source(Unit)]);
|
?CONSOLE("Compiled ~s\n", [unit_source(Unit)]);
|
||||||
{ok, Warnings} ->
|
{ok, Warnings} ->
|
||||||
|
@ -224,7 +213,7 @@ compile_worker(QueuePid, Config, CompileFn) ->
|
||||||
QueuePid ! {next, self()},
|
QueuePid ! {next, self()},
|
||||||
receive
|
receive
|
||||||
{compile, Source} ->
|
{compile, Source} ->
|
||||||
case catch(compile(Source, Config, CompileFn)) of
|
case catch(CompileFn(Source, Config)) of
|
||||||
{ok, Ws} ->
|
{ok, Ws} ->
|
||||||
QueuePid ! {compiled, Source, Ws},
|
QueuePid ! {compiled, Source, Ws},
|
||||||
compile_worker(QueuePid, Config, CompileFn);
|
compile_worker(QueuePid, Config, CompileFn);
|
||||||
|
|
Loading…
Reference in a new issue