diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 15 | ||||
-rw-r--r-- | src/rebar_utils.erl | 14 |
2 files changed, 14 insertions, 15 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index fe06cbf..8b63321 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -70,13 +70,12 @@ -spec compile(Config::rebar_config:config(), AppFile::file:filename()) -> 'ok'. compile(Config, _AppFile) -> - %% TODO: enable as soon as OTP patch has been accepted - %% ?DEPRECATED(fail_on_warning, warnings_as_errors, - %% rebar_config:get_list(Config, xrl_opts, []), - %% "once R15 is released"), - %% ?DEPRECATED(fail_on_warning, warnings_as_errors, - %% rebar_config:get_list(Config, yrl_opts, []), - %% "once R15 is released"), + ?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( @@ -299,7 +298,7 @@ compile_xrl_yrl(Source, Target, Opts, Mod) -> {ok, _, []} -> ok; {ok, _, _Warnings} -> - %% TODO: remove once R15 is released + %% TODO: remove once R14B04 is released case lists:member(fail_on_warning, Opts) of true -> ?FAIL; diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index ebf6656..f18621b 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -41,7 +41,7 @@ find_executable/1, prop_check/3, expand_code_path/0, - deprecated/3, deprecated/4]). + deprecated/4, deprecated/5]). -include("rebar.hrl"). @@ -261,19 +261,19 @@ emulate_escript_foldl(Fun, Acc, File) -> Error end. -deprecated(Old, New, Opts, When) -> +deprecated(Key, Old, New, Opts, When) -> case lists:member(Old, Opts) of true -> - deprecated(Old, New, When); + deprecated(Key, Old, New, When); false -> ok end. -deprecated(Old, New, When) -> +deprecated(Key, Old, New, When) -> io:format( << - "WARNING: option deprecated~n" - "Config option '~p' has been deprecated~n" + "WARNING: deprecated ~p option used~n" + "Option '~p' has been deprecated~n" "in favor of '~p'.~n" "'~p' will be removed ~s.~n~n" - >>, [Old, New, Old, When]). + >>, [Key, Old, New, Old, When]). |