diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index c38fb11..f49fc85 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -129,21 +129,10 @@ remove_common_path1([Part | RestFilename], [Part | RestPath]) -> remove_common_path1(FilenameParts, _) -> filename:join(FilenameParts). - -compile(Unit, Config, CompileFn) -> - case CompileFn(Unit, Config) of - ok -> - ok; - skipped -> - skipped; - Error -> - Error - end. - compile_each([], _Config, _CompileFn) -> ok; compile_each([Unit | Rest], Config, CompileFn) -> - case compile(Unit, Config, CompileFn) of + case CompileFn(Unit, Config) of ok -> ?CONSOLE("Compiled ~s\n", [unit_source(Unit)]); {ok, Warnings} -> @@ -224,7 +213,7 @@ compile_worker(QueuePid, Config, CompileFn) -> QueuePid ! {next, self()}, receive {compile, Source} -> - case catch(compile(Source, Config, CompileFn)) of + case catch(CompileFn(Source, Config)) of {ok, Ws} -> QueuePid ! {compiled, Source, Ws}, compile_worker(QueuePid, Config, CompileFn);