summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-07-15 08:45:36 -0400
committerFred Hebert <mononcqc@ferd.ca>2014-07-15 08:45:36 -0400
commit8b6a2a8c74c75a2bb2fa45567b1e16ee5aee8658 (patch)
treebcaa74ffe8c1acb40f456a5b421ecabeffec0ac2
parent353af1cdba8f48c0c0355d726c532cc942b69cb0 (diff)
parent15373a580fa11783a28084f8456211dd84c270b8 (diff)
Merge branch 'minor-fixes' of https://github.com/tuncer/rebar into tuncer-minor-fixes
-rwxr-xr-xbootstrap9
-rw-r--r--rebar.config13
-rw-r--r--src/rebar_config.erl6
-rw-r--r--src/rebar_erlc_compiler.erl6
4 files changed, 20 insertions, 14 deletions
diff --git a/bootstrap b/bootstrap
index cc2a751..df09f7e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -36,10 +36,11 @@ main(Args) ->
%% Extract the system info of the version of OTP we use to compile rebar
OtpInfo = string:strip(erlang:system_info(otp_release), both, $\n),
- %% 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
- %% in Erlang 18. namespaced_types option is used to select proper type name
- %% depending of the OTP version used.
+ %% 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 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
true -> {d, namespaced_types};
false -> undefined
diff --git a/rebar.config b/rebar.config
index bf4ef4f..1c62a55 100644
--- a/rebar.config
+++ b/rebar.config
@@ -4,11 +4,16 @@
%% escript_incl_extra is for internal rebar-private use only.
%% Do not use outside rebar. Config interface is not stable.
{escript_incl_extra, [{"priv/templates/*", "."}]}.
+
%% 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
-%% in Erlang 18. namespaced_types option is used to select proper type name
-%% depending of the OTP version used.
-{erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, warnings_as_errors]}.
+%% At the same time, their counterparts dict() and digraph() are to be
+%% deprecated in Erlang 18. namespaced_types option is used to select proper
+%% type name depending on the OTP version used.
+{erl_opts,
+ [
+ {platform_define, "^[0-9]+", namespaced_types}
+ ]}.
+
{xref_checks, []}.
{xref_queries,
[{"(XC - UC) || (XU - X - B
diff --git a/src/rebar_config.erl b/src/rebar_config.erl
index 1c90d22..bdc3fb5 100644
--- a/src/rebar_config.erl
+++ b/src/rebar_config.erl
@@ -40,10 +40,10 @@
-include("rebar.hrl").
-ifdef(namespaced_types).
-% dict:dict() exists starting from Erlang 17.
--type rebar_dict() :: dict:dict().
+%% dict:dict() exists starting from Erlang 17.
+-type rebar_dict() :: dict:dict(term(), term()).
-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().
-endif.
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 376cde5..f628433 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -48,10 +48,10 @@
}).
-ifdef(namespaced_types).
-% digraph:digraph() exists starting from Erlang 17.
--type rebar_digraph() :: digraph:digraph().
+%% digraph:graph() exists starting from Erlang 17.
+-type rebar_digraph() :: digraph:graph().
-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().
-endif.