diff options
| author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-05 10:21:07 -0600 | 
|---|---|---|
| committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-05 10:21:07 -0600 | 
| commit | 859121d5d9b85ca33a17120fa3f0cf8f3edf95a3 (patch) | |
| tree | 1f321674b82b29bf61412ced6b2a3153ed349951 | |
| parent | fcd2ec662b7c275956ef0b996566307307e6d8a8 (diff) | |
| parent | 0fc8e97292ceecf47409d1efdea8911ac4323026 (diff) | |
Merge pull request #36 from tsloughter/config_reading
only read in rebar config and lock of dep if needed
| -rw-r--r-- | src/rebar_app_discover.erl | 21 | ||||
| -rw-r--r-- | src/rebar_prv_install_deps.erl | 1 | 
2 files changed, 4 insertions, 18 deletions
| diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index e2bf05e..aad8985 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -121,23 +121,10 @@ create_app_info(AppDir, AppFile) ->              AppVsn = proplists:get_value(vsn, AppDetails),              Applications = proplists:get_value(applications, AppDetails, []),              IncludedApplications = proplists:get_value(included_applications, AppDetails, []), -            C = rebar_config:consult(AppDir), -            S = rebar_state:new(rebar_state:new(), C, AppDir), -            AppDeps = rebar_state:deps_names(S), -            AbsCwd = filename:absname(rebar_dir:get_cwd()), -            {ok, AppInfo} = rebar_app_info:new(AppName, AppVsn, AppDir, AppDeps), -            RebarConfig = filename:join(AppDir, "rebar.config"), -            AppState = case filelib:is_file(RebarConfig) of -                            true -> -                                Terms = rebar_config:consult_file(RebarConfig), -                                rebar_state:new(Terms); -                            false -> -                                rebar_state:new() -                        end, -            AppState1 = rebar_state:set(AppState, base_dir, AbsCwd), -            AppInfo1 = rebar_app_info:applications(rebar_app_info:config( -                                                     rebar_app_info:app_details(AppInfo, AppDetails) -                                                     ,AppState1), IncludedApplications++Applications), +            {ok, AppInfo} = rebar_app_info:new(AppName, AppVsn, AppDir, []), +            AppInfo1 = rebar_app_info:applications( +                         rebar_app_info:app_details(AppInfo, AppDetails), +                         IncludedApplications++Applications),              rebar_app_info:dir(AppInfo1, AppDir);          _ ->              error diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 5fcc4d6..ade0c81 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -207,7 +207,6 @@ update_src_deps(Level, SrcDeps, PkgDeps, SrcApps, State, Update, Seen) ->                                                     ,SrcAppsAcc                                                     ,Level                                                     ,StateAcc1) -                                   end,                               {SrcDepsAcc1, PkgDepsAcc1, SrcAppsAcc1, StateAcc2, SeenAcc1}                       end, {[], PkgDeps, SrcApps, State, Seen}, SrcDeps) of | 
