Przeglądaj źródła

Merge pull request #2191 from michaelklishin/otp-23-master-compat

OTP 23 [master] compatibility
pull/2194/head
Tristan Sloughter 5 lat temu
committed by GitHub
rodzic
commit
1553164a52
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 22 dodań i 2 usunięć
  1. +6
    -0
      src/r3_hex_api.erl
  2. +1
    -1
      src/r3_hex_tarball.erl
  3. +8
    -1
      src/rebar_git_resource.erl
  4. +7
    -0
      src/rebar_utils.erl

+ 6
- 0
src/r3_hex_api.erl Wyświetl plik

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

+ 1
- 1
src/r3_hex_tarball.erl Wyświetl plik

@ -201,7 +201,7 @@ do_unpack(Files, Output) ->
finish_unpack({error, _} = Error) ->
Error;
finish_unpack(#{metadata := Metadata, files := Files, output := Output}) ->
_Version = maps:get("VERSION", Files),
true = maps:is_key("VERSION", Files),
Checksum = decode_base16(maps:get("CHECKSUM", Files)),
ContentsBinary = maps:get("contents.tar.gz", Files),
case unpack_tarball(ContentsBinary, Output) of

+ 8
- 1
src/rebar_git_resource.erl Wyświetl plik

@ -100,6 +100,13 @@ compare_url(Dir, Url) ->
?DEBUG("Comparing git url ~p with ~p", [ParsedUrl, ParsedCurrentUrl]),
ParsedCurrentUrl =:= ParsedUrl.
-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
case re:run(Url, ?SCP_PATTERN, [{capture, [host, path], list}, unicode]) of
@ -351,7 +358,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

+ 7
- 0
src/rebar_utils.erl Wyświetl plik

@ -908,6 +908,13 @@ get_http_vars(Scheme) ->
Config = rebar_config:consult_file(GlobalConfigFile),
proplists:get_value(Scheme, Config, OS).
-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)),
set_httpc_options(proxy, get_http_vars(http_proxy)).

Ładowanie…
Anuluj
Zapisz