diff options
-rw-r--r-- | src/rebar_app_discover.erl | 1 | ||||
-rw-r--r-- | src/rebar_app_utils.erl | 6 | ||||
-rw-r--r-- | src/rebar_prv_install_deps.erl | 7 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index 08502a9..b819313 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -77,7 +77,6 @@ merge_deps(AppInfo, State) -> CurrentProfiles = rebar_state:current_profiles(State), Name = rebar_app_info:name(AppInfo), C = project_app_config(AppInfo, State), - %% We reset the opts here to default so no profiles are applied multiple times AppState = rebar_state:apply_overrides( rebar_state:apply_profiles( diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index 545ce95..be2b289 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -171,8 +171,10 @@ dep_to_app(Parent, DepsDir, Name, Vsn, Source, IsLock, State) -> end, C = rebar_config:consult(rebar_app_info:dir(AppInfo)), AppInfo0 = rebar_app_info:update_opts(AppInfo, rebar_app_info:opts(AppInfo), C), - AppInfo1 = rebar_app_info:apply_overrides(rebar_state:get(State, overrides, []), AppInfo0), - rebar_app_info:is_lock(rebar_app_info:source(AppInfo1, Source), IsLock). + Overrides = rebar_state:get(State, overrides, []), + AppInfo1 = rebar_app_info:set(AppInfo0, overrides, rebar_app_info:get(AppInfo, overrides, [])++Overrides), + AppInfo2 = rebar_app_info:apply_overrides(rebar_app_info:get(AppInfo1, overrides, []), AppInfo1), + rebar_app_info:is_lock(rebar_app_info:source(AppInfo2, Source), IsLock). format_error({missing_package, Package}) -> io_lib:format("Package not found in registry: ~s", [Package]); diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index aeda252..789ad2f 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -253,11 +253,9 @@ update_unseen_dep(AppInfo, Profile, Level, Deps, Apps, State, Upgrade, Seen, Loc handle_dep(State, Profile, DepsDir, AppInfo, Locks, Level) -> Profiles = rebar_state:current_profiles(State), Name = rebar_app_info:name(AppInfo), - C = rebar_config:consult(rebar_app_info:dir(AppInfo)), AppInfo0 = rebar_app_info:update_opts(AppInfo, rebar_app_info:opts(AppInfo), C), - AppInfo1 = rebar_app_info:apply_overrides(rebar_state:overrides(State), AppInfo0), - + AppInfo1 = rebar_app_info:apply_overrides(rebar_app_info:get(AppInfo, overrides, []), AppInfo0), AppInfo2 = rebar_app_info:apply_profiles(AppInfo1, Profiles), Plugins = rebar_app_info:get(AppInfo2, plugins, []), AppInfo3 = rebar_app_info:set(AppInfo2, {plugins, Profile}, Plugins), @@ -275,7 +273,8 @@ handle_dep(State, Profile, DepsDir, AppInfo, Locks, Level) -> %% Upgrade lock level to be the level the dep will have in this dep tree Deps = rebar_app_info:get(AppInfo3, {deps, default}, []), AppInfo4 = rebar_app_info:deps(AppInfo3, rebar_state:deps_names(Deps)), - Deps1 = rebar_app_utils:parse_deps(Name, DepsDir, Deps, State, Locks, Level+1), + 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), Locks, Level+1), {AppInfo4, Deps1, State1}. -spec maybe_fetch(rebar_app_info:t(), atom(), boolean(), |