ソースを参照

Ignore deprecation warnings for a few more http_uri funs

Switching to uri_string as the warning suggest
would ruin OTP 20 compatibility.
pull/2191/head
Michael Klishin 5年前
コミット
bb9f44c728
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: E80EDCFA0CDB21EE
3個のファイルの変更8行の追加2行の削除
  1. +1
    -1
      src/r3_hex_api.erl
  2. +4
    -1
      src/rebar_git_resource.erl
  3. +3
    -0
      src/rebar_utils.erl

+ 1
- 1
src/r3_hex_api.erl ファイルの表示

@ -28,7 +28,7 @@ put(Config, Path, Body) ->
delete(Config, Path) ->
request(Config, delete, Path, undefined).
-compile({nowarn_deprecated_function, [http_uri, encode, 1]}).
-compile({nowarn_deprecated_function, [{http_uri, encode, 1}]}).
%% @private
encode_query_string(List) ->

+ 4
- 1
src/rebar_git_resource.erl ファイルの表示

@ -100,6 +100,9 @@ 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}]}).
parse_git_url(Url) ->
%% Checks for standard scp style git remote
case re:run(Url, ?SCP_PATTERN, [{capture, [host, path], list}, unicode]) of
@ -351,7 +354,7 @@ parse_tags(Dir) ->
end.
git_clone_options() ->
Option = case os:getenv("REBAR_GIT_CLONE_OPTIONS") of
Option = case os:getenv("REBAR_GIT_CLONE_OPTIONS") of
false -> "" ; %% env var not set
Opt -> %% env var set to empty or others
Opt

+ 3
- 0
src/rebar_utils.erl ファイルの表示

@ -908,6 +908,9 @@ 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}]}).
set_httpc_options() ->
set_httpc_options(https_proxy, get_http_vars(https_proxy)),
set_httpc_options(proxy, get_http_vars(http_proxy)).

読み込み中…
キャンセル
保存