summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2016-01-09 14:07:05 -0600
committerTristan Sloughter <t@crashfast.com>2016-01-09 14:07:05 -0600
commit5dba402a1154365f83884a33d17b7fa76c0b9c0e (patch)
treeb23b5db92d624c664369c69eb65be0b709fe28a7 /src
parent136e5921fb10bd6acb5b907b9996e5a085822190 (diff)
only apply default and prod profile to dependencies
Diffstat (limited to 'src')
-rw-r--r--src/rebar_app_utils.erl4
-rw-r--r--src/rebar_prv_install_deps.erl5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl
index ae1ea1c..d3ef841 100644
--- a/src/rebar_app_utils.erl
+++ b/src/rebar_app_utils.erl
@@ -166,7 +166,9 @@ dep_to_app(Parent, DepsDir, Name, Vsn, Source, IsLock, State) ->
Overrides = rebar_state:get(State, overrides, []),
AppInfo2 = rebar_app_info:set(AppInfo1, overrides, rebar_app_info:get(AppInfo, overrides, [])++Overrides),
AppInfo3 = rebar_app_info:apply_overrides(rebar_app_info:get(AppInfo2, overrides, []), AppInfo2),
- rebar_app_info:is_lock(AppInfo3, IsLock).
+ AppInfo4 = rebar_app_info:apply_profiles(AppInfo3, [default, prod]),
+ AppInfo5 = rebar_app_info:profiles(AppInfo4, [default]),
+ rebar_app_info:is_lock(AppInfo5, IsLock).
update_source(AppInfo, {pkg, PkgName, PkgVsn}, State) ->
{PkgName1, PkgVsn1} = case PkgVsn of
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 118d799..a484c5f 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -251,13 +251,12 @@ update_unseen_dep(AppInfo, Profile, Level, Deps, Apps, State, Upgrade, Seen, Loc
-spec handle_dep(rebar_state:t(), atom(), file:filename_all(), rebar_app_info:t(), list(), integer()) -> {rebar_app_info:t(), [rebar_app_info:t()], rebar_state:t()}.
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_app_info:get(AppInfo, overrides, []), AppInfo0),
- AppInfo2 = rebar_app_info:apply_profiles(AppInfo1, Profiles),
+ AppInfo2 = rebar_app_info:apply_profiles(AppInfo1, [default, prod]),
Plugins = rebar_app_info:get(AppInfo2, plugins, []),
AppInfo3 = rebar_app_info:set(AppInfo2, {plugins, Profile}, Plugins),
@@ -269,7 +268,7 @@ handle_dep(State, Profile, DepsDir, AppInfo, Locks, Level) ->
State1 = rebar_plugins:install(State, AppInfo3),
%% Upgrade lock level to be the level the dep will have in this dep tree
- Deps = rebar_app_info:get(AppInfo3, {deps, default}, []),
+ Deps = rebar_app_info:get(AppInfo3, {deps, default}, []) ++ rebar_app_info:get(AppInfo3, {deps, prod}, []),
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