From 5f995bfdc007c7f8c23d2b933a40627c1f311a04 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 29 Jun 2014 20:15:43 +0200 Subject: Fix a few minor formatting inconsistencies * fix overlong lines * where appropriate use %% instead of % --- bootstrap | 9 +++++---- rebar.config | 14 ++++++++++---- src/rebar_config.erl | 4 ++-- src/rebar_erlc_compiler.erl | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/bootstrap b/bootstrap index f6aa6cc..ad27898 100755 --- a/bootstrap +++ b/bootstrap @@ -28,10 +28,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 of 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..a64f00e 100644 --- a/rebar.config +++ b/rebar.config @@ -4,11 +4,17 @@ %% 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 of the OTP version used. +{erl_opts, + [ + {platform_define, "^[0-9]+", namespaced_types}, + warnings_as_errors + ]}. + {xref_checks, []}. {xref_queries, [{"(XC - UC) || (XU - X - B diff --git a/src/rebar_config.erl b/src/rebar_config.erl index 1c90d22..0127aff 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. +%% dict:dict() exists starting from Erlang 17. -type rebar_dict() :: dict:dict(). -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..ae4503b 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. +%% digraph:digraph() exists starting from Erlang 17. -type rebar_digraph() :: digraph:digraph(). -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. -- cgit v1.1 From c22370a2cbd99ab884aeb248faaf254f9c9ea9b0 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 29 Jun 2014 21:03:26 +0200 Subject: Use correct types for OTP >=17.x --- src/rebar_config.erl | 2 +- src/rebar_erlc_compiler.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rebar_config.erl b/src/rebar_config.erl index 0127aff..bdc3fb5 100644 --- a/src/rebar_config.erl +++ b/src/rebar_config.erl @@ -41,7 +41,7 @@ -ifdef(namespaced_types). %% dict:dict() exists starting from Erlang 17. --type rebar_dict() :: dict:dict(). +-type rebar_dict() :: dict:dict(term(), term()). -else. %% dict() has been obsoleted in Erlang 17 and deprecated in 18. -type rebar_dict() :: dict(). diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index ae4503b..f628433 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -48,8 +48,8 @@ }). -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. -type rebar_digraph() :: digraph(). -- cgit v1.1 From 71c2f17c9b2eef655423f87a71c767f964f478e2 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 29 Jun 2014 21:06:05 +0200 Subject: Remove warnings_as_errors from rebar.config rebar's beam files are actually compiled by bootstrap's call to make:files/2, so warnings_as_errors in rebar.config isn't really used. --- rebar.config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rebar.config b/rebar.config index a64f00e..210d193 100644 --- a/rebar.config +++ b/rebar.config @@ -11,8 +11,7 @@ %% type name depending of the OTP version used. {erl_opts, [ - {platform_define, "^[0-9]+", namespaced_types}, - warnings_as_errors + {platform_define, "^[0-9]+", namespaced_types} ]}. {xref_checks, []}. -- cgit v1.1 From 15373a580fa11783a28084f8456211dd84c270b8 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 13 Jul 2014 15:12:09 +0200 Subject: Fix typo s/of/on/ --- bootstrap | 2 +- rebar.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index ad27898..7086098 100755 --- a/bootstrap +++ b/bootstrap @@ -32,7 +32,7 @@ main(Args) -> %% 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. + %% 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 210d193..1c62a55 100644 --- a/rebar.config +++ b/rebar.config @@ -8,7 +8,7 @@ %% 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. +%% type name depending on the OTP version used. {erl_opts, [ {platform_define, "^[0-9]+", namespaced_types} -- cgit v1.1