From 5a0aa04b20cbb56022a7af1e8eee6ee32e668083 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 6 Oct 2011 17:04:37 +0200 Subject: [PATCH] Cleanup deprecations now that R14B04 is released --- src/rebar_erlc_compiler.erl | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index cf9b5bd..9611097 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -70,13 +70,6 @@ -spec compile(Config::rebar_config:config(), AppFile::file:filename()) -> 'ok'. compile(Config, _AppFile) -> - ?DEPRECATED(xrl_opts, fail_on_warning, warnings_as_errors, - rebar_config:get_list(Config, xrl_opts, []), - "once R14B04 is released"), - ?DEPRECATED(yrl_opts, fail_on_warning, warnings_as_errors, - rebar_config:get_list(Config, yrl_opts, []), - "once R14B04 is released"), - rebar_base_compiler:run(Config, check_files(rebar_config:get_local( Config, xrl_first_files, [])), @@ -287,15 +280,13 @@ compile_mib(Source, Target, Config) -> -spec compile_xrl(Source::file:filename(), Target::file:filename(), Config::rebar_config:config()) -> 'ok'. compile_xrl(Source, Target, Config) -> - Opts = [{scannerfile, Target}, {return, true} - | rebar_config:get(Config, xrl_opts, [])], + Opts = [{scannerfile, Target} | rebar_config:get(Config, xrl_opts, [])], compile_xrl_yrl(Source, Target, Opts, leex). -spec compile_yrl(Source::file:filename(), Target::file:filename(), Config::rebar_config:config()) -> 'ok'. compile_yrl(Source, Target, Config) -> - Opts = [{parserfile, Target}, {return, true} - | rebar_config:get(Config, yrl_opts, [])], + Opts = [{parserfile, Target} | rebar_config:get(Config, yrl_opts, [])], compile_xrl_yrl(Source, Target, Opts, yecc). -spec compile_xrl_yrl(Source::file:filename(), Target::file:filename(), @@ -304,16 +295,8 @@ compile_xrl_yrl(Source, Target, Opts, Mod) -> case needs_compile(Source, Target, []) of true -> case Mod:file(Source, Opts) of - {ok, _, []} -> + {ok, _} -> ok; - {ok, _, _Warnings} -> - %% TODO: remove once R14B04 is released - case lists:member(fail_on_warning, Opts) of - true -> - ?FAIL; - false -> - ok - end; _X -> ?FAIL end;