summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-08-31 11:12:24 -0500
committerTristan Sloughter <t@crashfast.com>2014-08-31 11:12:41 -0500
commit829d4f2ca50e70091b42d5d6a42dfbc8873cf52c (patch)
tree3170668cb23109e4ee580dd4e835bd49142c611b /src/rebar_app_discover.erl
parent21f47438614a0d50caf20801c4440d54d12c3f20 (diff)
refactor install_deps again and rename app_builder to compile
Diffstat (limited to 'src/rebar_app_discover.erl')
-rw-r--r--src/rebar_app_discover.erl12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index aaaeb03..12193b5 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -7,8 +7,9 @@
do(State, LibDirs) ->
Apps = find_apps(LibDirs, all),
+ ProjectDeps = rebar_state:deps_names(State),
lists:foldl(fun(AppInfo, StateAcc) ->
- rebar_state:apps_to_build(StateAcc, AppInfo)
+ rebar_state:project_apps(StateAcc, rebar_app_info:deps(AppInfo, ProjectDeps))
end, State, Apps).
-spec all_app_dirs(list(file:name())) -> list(file:name()).
@@ -35,15 +36,10 @@ app_dirs(LibDir) ->
"*.app"]),
lists:usort(lists:foldl(fun(Path, Acc) ->
- Files = filelib:wildcard(to_list(Path)),
+ Files = filelib:wildcard(ec_cnv:to_list(Path)),
[app_dir(File) || File <- Files] ++ Acc
end, [], [Path1, Path2, Path3, Path4])).
-to_list(S) when is_list(S) ->
- S;
-to_list(S) when is_binary(S) ->
- binary_to_list(S).
-
find_unbuilt_apps(LibDirs) ->
find_apps(LibDirs, invalid).
@@ -149,7 +145,7 @@ get_modules_list(AppFile, AppDetail) ->
ok | {error, Reason::term()}.
has_all_beams(EbinDir, [Module | ModuleList]) ->
BeamFile = filename:join([EbinDir,
- list_to_binary(atom_to_list(Module) ++ ".beam")]),
+ ec_cnv:to_list(Module) ++ ".beam"]),
case filelib:is_file(BeamFile) of
true ->
has_all_beams(EbinDir, ModuleList);