瀏覽代碼

Only suppress deprecation warnings on OTP 23

For OTP 19 and earlier compatibility.
pull/2191/head
Michael Klishin 5 年之前
父節點
當前提交
b93bb35819
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: E80EDCFA0CDB21EE
共有 3 個檔案被更改,包括 17 行新增5 行删除
  1. +5
    -1
      src/r3_hex_api.erl
  2. +6
    -2
      src/rebar_git_resource.erl
  3. +6
    -2
      src/rebar_utils.erl

+ 5
- 1
src/r3_hex_api.erl 查看文件

@ -28,7 +28,11 @@ put(Config, Path, Body) ->
delete(Config, Path) ->
request(Config, delete, Path, undefined).
-compile({nowarn_deprecated_function, [{http_uri, encode, 1}]}).
-ifdef (OTP_RELEASE).
-if(?OTP_RELEASE >= 23).
-compile({nowarn_deprecated_function, [{http_uri, encode, 1}]}).
-endif.
-endif.
%% @private
encode_query_string(List) ->

+ 6
- 2
src/rebar_git_resource.erl 查看文件

@ -100,8 +100,12 @@ compare_url(Dir, Url) ->
?DEBUG("Comparing git url ~p with ~p", [ParsedUrl, ParsedCurrentUrl]),
ParsedCurrentUrl =:= ParsedUrl.
-compile({nowarn_deprecated_function, [{http_uri, parse, 2},
{http_uri, scheme_defaults, 0}]}).
-ifdef (OTP_RELEASE).
-if(?OTP_RELEASE >= 23).
-compile({nowarn_deprecated_function, [{http_uri, parse, 2},
{http_uri, scheme_defaults, 0}]}).
-endif.
-endif.
parse_git_url(Url) ->
%% Checks for standard scp style git remote

+ 6
- 2
src/rebar_utils.erl 查看文件

@ -908,8 +908,12 @@ get_http_vars(Scheme) ->
Config = rebar_config:consult_file(GlobalConfigFile),
proplists:get_value(Scheme, Config, OS).
-compile({nowarn_deprecated_function, [{http_uri, parse, 1},
{http_uri, decode, 1}]}).
-ifdef (OTP_RELEASE).
-if(?OTP_RELEASE >= 23).
-compile({nowarn_deprecated_function, [{http_uri, parse, 1},
{http_uri, decode, 1}]}).
-endif.
-endif.
set_httpc_options() ->
set_httpc_options(https_proxy, get_http_vars(https_proxy)),

Loading…
取消
儲存