Merge branch 'minor-fixes' of https://github.com/tuncer/rebar into tuncer-minor-fixes

This commit is contained in:
Fred Hebert 2014-07-15 08:45:36 -04:00
commit 8b6a2a8c74
4 changed files with 20 additions and 14 deletions

View file

@ -36,10 +36,11 @@ main(Args) ->
%% Extract the system info of the version of OTP we use to compile rebar %% Extract the system info of the version of OTP we use to compile rebar
OtpInfo = string:strip(erlang:system_info(otp_release), both, $\n), OtpInfo = string:strip(erlang:system_info(otp_release), both, $\n),
%% Types dict:dict() and digraph:digraph() have been introduced in Erlang 17. %% Types dict:dict() and digraph:digraph() have been introduced in
%% At the same time, their counterparts dict() and digraph() are to be deprecated %% Erlang 17.
%% in Erlang 18. namespaced_types option is used to select proper type name %% At the same time, their counterparts dict() and digraph() are to be
%% depending of the OTP version used. %% deprecated in Erlang 18. namespaced_types option is used to select
%% proper type name depending on the OTP version used.
NamespacedTypes = case is_otp(OtpInfo, "^[0-9]+") of NamespacedTypes = case is_otp(OtpInfo, "^[0-9]+") of
true -> {d, namespaced_types}; true -> {d, namespaced_types};
false -> undefined false -> undefined

View file

@ -4,11 +4,16 @@
%% escript_incl_extra is for internal rebar-private use only. %% escript_incl_extra is for internal rebar-private use only.
%% Do not use outside rebar. Config interface is not stable. %% Do not use outside rebar. Config interface is not stable.
{escript_incl_extra, [{"priv/templates/*", "."}]}. {escript_incl_extra, [{"priv/templates/*", "."}]}.
%% Types dict:dict() and digraph:digraph() have been introduced in Erlang 17. %% Types dict:dict() and digraph:digraph() have been introduced in Erlang 17.
%% At the same time, their counterparts dict() and digraph() are to be deprecated %% At the same time, their counterparts dict() and digraph() are to be
%% in Erlang 18. namespaced_types option is used to select proper type name %% deprecated in Erlang 18. namespaced_types option is used to select proper
%% depending of the OTP version used. %% type name depending on the OTP version used.
{erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, warnings_as_errors]}. {erl_opts,
[
{platform_define, "^[0-9]+", namespaced_types}
]}.
{xref_checks, []}. {xref_checks, []}.
{xref_queries, {xref_queries,
[{"(XC - UC) || (XU - X - B [{"(XC - UC) || (XU - X - B

View file

@ -40,10 +40,10 @@
-include("rebar.hrl"). -include("rebar.hrl").
-ifdef(namespaced_types). -ifdef(namespaced_types).
% dict:dict() exists starting from Erlang 17. %% dict:dict() exists starting from Erlang 17.
-type rebar_dict() :: dict:dict(). -type rebar_dict() :: dict:dict(term(), term()).
-else. -else.
% dict() has been obsoleted in Erlang 17 and deprecated in 18. %% dict() has been obsoleted in Erlang 17 and deprecated in 18.
-type rebar_dict() :: dict(). -type rebar_dict() :: dict().
-endif. -endif.

View file

@ -48,10 +48,10 @@
}). }).
-ifdef(namespaced_types). -ifdef(namespaced_types).
% digraph:digraph() exists starting from Erlang 17. %% digraph:graph() exists starting from Erlang 17.
-type rebar_digraph() :: digraph:digraph(). -type rebar_digraph() :: digraph:graph().
-else. -else.
% digraph() has been obsoleted in Erlang 17 and deprecated in 18. %% digraph() has been obsoleted in Erlang 17 and deprecated in 18.
-type rebar_digraph() :: digraph(). -type rebar_digraph() :: digraph().
-endif. -endif.