From be49c5cd44d536c440b3188f3e0a5279218ea4fc Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 17 Feb 2015 10:04:12 -0600 Subject: use project sub-apps with deps in their rebar.config --- src/rebar_prv_install_deps.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rebar_prv_install_deps.erl') diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 61fbd70..d922522 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -267,7 +267,7 @@ update_src_deps(Profile, Level, SrcDeps, PkgDeps, SrcApps, State, Upgrade, Seen, ,StateAcc ,LocksAcc), - {SrcDepsAcc1, PkgDepsAcc1, SrcAppsAcc1, StateAcc2, SeenAcc, LocksAcc1} + {SrcDepsAcc1, PkgDepsAcc1, SrcAppsAcc1, StateAcc2, SeenAcc, LocksAcc1} end; false -> {SeenAcc1, StateAcc1} = maybe_lock(Profile, AppInfo, SeenAcc, StateAcc, Level), -- cgit v1.1 From 8874e414a80f7f29e3a8c8f00b3887399a7a6cbc Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Thu, 19 Feb 2015 08:13:56 -0600 Subject: sort project apps before merging deps --- src/rebar_prv_install_deps.erl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/rebar_prv_install_deps.erl') diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index d922522..8db4761 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -44,8 +44,6 @@ -define(PROVIDER, install_deps). -define(DEPS, [app_discovery]). --define(APP_NAME_INDEX, 2). - -type src_dep() :: {atom(), {atom(), string(), string()}} | {atom(), string(), {atom(), string(), string()}}. -type pkg_dep() :: {atom(), binary()} | atom(). @@ -296,7 +294,7 @@ update_src_deps(Profile, Level, SrcDeps, PkgDeps, SrcApps, State, Upgrade, Seen, end end, {[], PkgDeps, SrcApps, State, Seen, Locks}, - sort_deps(SrcDeps)) of + rebar_utils:sort_deps(SrcDeps)) of {[], NewPkgDeps, NewSrcApps, State1, Seen1, _NewLocks} -> {State1, NewSrcApps, NewPkgDeps, Seen1}; {NewSrcDeps, NewPkgDeps, NewSrcApps, State1, Seen1, NewLocks} -> @@ -486,14 +484,6 @@ maybe_upgrade(AppInfo, AppDir, true, State) -> false end. -sort_deps(Deps) -> - %% We need a sort stable, based on the name. So that for multiple deps on - %% the same level with the same name, we keep the order the parents had. - %% `lists:keysort/2' is documented as stable in the stdlib. - %% The list of deps is revered when we get it. For the proper stable - %% result, re-reverse it. - lists:keysort(?APP_NAME_INDEX, lists:reverse(Deps)). - -spec parse_goal(binary(), binary()) -> pkg_dep(). parse_goal(Name, Constraint) -> case re:run(Constraint, "([^\\d]*)(\\d.*)", [{capture, [1,2], binary}]) of -- cgit v1.1