summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_app_discover.erl2
-rw-r--r--src/rebar_prv_install_deps.erl4
-rw-r--r--src/rebar_state.erl14
3 files changed, 3 insertions, 17 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index a0b6d8c..1052774 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -81,7 +81,7 @@ merge_deps(AppInfo, State) ->
Name = rebar_app_info:name(AppInfo0),
%% We reset the opts here to default so no profiles are applied multiple times
- AppInfo1 = rebar_app_info:apply_overrides(rebar_state:overrides(State), AppInfo0),
+ AppInfo1 = rebar_app_info:apply_overrides(rebar_state:get(State, overrides, []), AppInfo0),
AppInfo2 = rebar_app_info:apply_profiles(AppInfo1, CurrentProfiles),
rebar_utils:check_min_otp_version(rebar_app_info:get(AppInfo2, minimum_otp_vsn, undefined)),
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index cd5f068..cb1bf00 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -273,8 +273,8 @@ handle_dep(State, Profile, DepsDir, AppInfo, Locks, Level) ->
AppInfo4 = rebar_app_info:deps(AppInfo3, rebar_state:deps_names(Deps)),
%% Keep all overrides from the global config and this dep when parsing its deps
- Overrides = rebar_state:overrides(State) ++ rebar_app_info:get(AppInfo0, overrides, []),
- Deps1 = rebar_app_utils:parse_deps(Name, DepsDir, Deps, rebar_state:overrides(State, Overrides)
+ Overrides = rebar_app_info:get(AppInfo0, overrides, []),
+ Deps1 = rebar_app_utils:parse_deps(Name, DepsDir, Deps, rebar_state:set(State, overrides, Overrides)
,Locks, Level+1),
{AppInfo4, Deps1, State1}.
diff --git a/src/rebar_state.erl b/src/rebar_state.erl
index 494624f..4a95a9a 100644
--- a/src/rebar_state.erl
+++ b/src/rebar_state.erl
@@ -35,8 +35,6 @@
deps_names/1,
- overrides/1, overrides/2,
- apply_overrides/2,
resources/1, resources/2, add_resource/2,
providers/1, providers/2, add_provider/2]).
@@ -62,7 +60,6 @@
all_plugin_deps = [] :: [rebar_app_info:t()],
all_deps = [] :: [rebar_app_info:t()],
- overrides = [],
resources = [],
providers = []}).
@@ -243,11 +240,6 @@ command_parsed_args(#state_t{command_parsed_args=CmdArgs}) ->
command_parsed_args(State, CmdArgs) ->
State#state_t{command_parsed_args=CmdArgs}.
-apply_overrides(State=#state_t{overrides=Overrides}, AppName) ->
- Name = binary_to_atom(AppName, utf8),
- Opts = rebar_utils:apply_overrides(opts(State), Name, Overrides),
- State#state_t{default=Opts, opts=Opts}.
-
add_to_profile(State, Profile, KVs) when is_atom(Profile), is_list(KVs) ->
Opts = rebar_utils:add_to_profile(opts(State), Profile, KVs),
State#state_t{opts=Opts}.
@@ -310,12 +302,6 @@ deps_names(State) ->
Deps = rebar_state:get(State, deps, []),
deps_names(Deps).
-overrides(#state_t{overrides=Overrides}) ->
- Overrides.
-
-overrides(State=#state_t{}, Overrides) ->
- State#state_t{overrides=Overrides}.
-
project_apps(#state_t{project_apps=Apps}) ->
Apps.