mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Add rebar_utils:deprecated/4 and remove define
This commit is contained in:
parent
e33d3a568f
commit
b1d84514f0
2 changed files with 10 additions and 10 deletions
|
@ -10,6 +10,3 @@
|
|||
-define(ERROR(Str, Args), rebar_log:log(error, Str, Args)).
|
||||
|
||||
-define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).
|
||||
|
||||
-define(DEPRECATED(Key, Old, New, Opts, When),
|
||||
rebar_utils:deprecated(Key, Old, New, Opts, When)).
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
find_executable/1,
|
||||
prop_check/3,
|
||||
expand_code_path/0,
|
||||
deprecated/5,
|
||||
deprecated/4, deprecated/5,
|
||||
expand_env_variable/3,
|
||||
is_skipped_app/0
|
||||
]).
|
||||
|
@ -326,12 +326,15 @@ emulate_escript_foldl(Fun, Acc, File) ->
|
|||
deprecated(Key, Old, New, Opts, When) ->
|
||||
case lists:member(Old, Opts) of
|
||||
true ->
|
||||
io:format(
|
||||
<<"WARNING: deprecated ~p option used~n"
|
||||
"Option '~p' has been deprecated~n"
|
||||
"in favor of '~p'.~n"
|
||||
"'~p' will be removed ~s.~n~n">>,
|
||||
[Key, Old, New, Old, When]);
|
||||
deprecated(Key, Old, New, When);
|
||||
false ->
|
||||
ok
|
||||
end.
|
||||
|
||||
deprecated(Key, Old, New, When) ->
|
||||
io:format(
|
||||
<<"WARNING: deprecated ~p option used~n"
|
||||
"Option '~p' has been deprecated~n"
|
||||
"in favor of '~p'.~n"
|
||||
"'~p' will be removed ~s.~n~n">>,
|
||||
[Key, Old, New, Old, When]).
|
||||
|
|
Loading…
Reference in a new issue