diff options
-rw-r--r-- | rebar.config | 6 | ||||
-rw-r--r-- | rebar.lock | 6 | ||||
-rw-r--r-- | src/rebar.app.src | 1 | ||||
-rw-r--r-- | src/rebar_state.erl | 19 |
4 files changed, 25 insertions, 7 deletions
diff --git a/rebar.config b/rebar.config index 7cd2ee7..ce807b8 100644 --- a/rebar.config +++ b/rebar.config @@ -1,13 +1,13 @@ %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ts=4 sw=4 ft=erlang et -{deps, [{erlware_commons, "0.16.0"}, +{deps, [{erlware_commons, "0.18.0"}, {ssl_verify_hostname, "1.0.5"}, {certifi, "0.1.1"}, - {providers, "1.5.0"}, + {providers, "1.6.0"}, {getopt, "0.8.2"}, {bbmustache, "1.0.4"}, - {relx, "3.8.0"}, + {relx, "3.9.0"}, {cf, "0.2.1"}, {cth_readable, "1.1.0"}, {eunit_formatters, "0.3.1"}]}. @@ -2,9 +2,9 @@ {<<"certifi">>,{pkg,<<"certifi">>,<<"0.1.1">>},0}, {<<"cf">>,{pkg,<<"cf">>,<<"0.2.1">>},0}, {<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.1.0">>},0}, - {<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"0.16.0">>},0}, + {<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"0.18.0">>},0}, {<<"eunit_formatters">>,{pkg,<<"eunit_formatters">>,<<"0.3.1">>},0}, {<<"getopt">>,{pkg,<<"getopt">>,<<"0.8.2">>},0}, - {<<"providers">>,{pkg,<<"providers">>,<<"1.5.0">>},0}, - {<<"relx">>,{pkg,<<"relx">>,<<"3.8.0">>},0}, + {<<"providers">>,{pkg,<<"providers">>,<<"1.6.0">>},0}, + {<<"relx">>,{pkg,<<"relx">>,<<"3.9.0">>},0}, {<<"ssl_verify_hostname">>,{pkg,<<"ssl_verify_hostname">>,<<"1.0.5">>},0}]. diff --git a/src/rebar.app.src b/src/rebar.app.src index 67973eb..58fee02 100644 --- a/src/rebar.app.src +++ b/src/rebar.app.src @@ -27,6 +27,7 @@ certifi, cth_readable, relx, + cf, inets, eunit_formatters]}, {env, [ diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 176a80b..0c07b2a 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -370,7 +370,24 @@ providers(State, NewProviders) -> -spec add_provider(t(), providers:t()) -> t(). add_provider(State=#state_t{providers=Providers}, Provider) -> - State#state_t{providers=[Provider | Providers]}. + Name = providers:impl(Provider), + Namespace = providers:namespace(Provider), + Module = providers:module(Provider), + case lists:any(fun(P) -> + case {providers:impl(P), providers:namespace(P)} of + {Name, Namespace} -> + ?DEBUG("Not adding provider ~p ~p from module ~p because it already exists from module ~p", + [Namespace, Name, providers:module(P), Module]), + true; + _ -> + false + end + end, Providers) of + true -> + State; + false -> + State#state_t{providers=[Provider | Providers]} + end. create_logic_providers(ProviderModules, State0) -> try |