summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-05-30 21:45:21 -0500
committerTristan Sloughter <t@crashfast.com>2015-05-30 21:46:42 -0500
commitb9b4e12600999cf2a2da4211508009ac7db96568 (patch)
treef2e3fa5e1324a7247e28c0cec0c45bccd7aa6a15
parent42d5db5ea367c18c672111466628cb6e38ab464a (diff)
keep all_deps list in state created for building deps
-rw-r--r--src/rebar_prv_compile.erl11
-rw-r--r--src/rebar_prv_escriptize.erl3
2 files changed, 9 insertions, 5 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 37dc47d..2737827 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -41,10 +41,12 @@ do(State) ->
Deps = rebar_state:deps_to_build(State),
Cwd = rebar_state:dir(State),
- %% Need to allow global config vars used on deps
- %% Right now no way to differeniate and just give deps a new state
+ %% Need to allow global config vars used on deps.
+ %% Right now no way to differeniate and just give deps a new state.
+ %% But need an account of "all deps" for some hooks to use.
EmptyState = rebar_state:new(),
- build_apps(EmptyState, Providers, Deps),
+ build_apps(rebar_state:all_deps(EmptyState,
+ rebar_state:all_deps(State)), Providers, Deps),
{ok, ProjectApps1} = rebar_digraph:compile_order(ProjectApps),
@@ -76,7 +78,8 @@ build_app(State, Providers, AppInfo) ->
copy_app_dirs(State, AppDir, OutDir),
S = rebar_app_info:state_or_new(State, AppInfo),
- compile(S, Providers, AppInfo).
+ S1 = rebar_state:all_deps(S, rebar_state:all_deps(State)),
+ compile(S1, Providers, AppInfo).
compile(State, Providers, AppInfo) ->
?INFO("Compiling ~s", [rebar_app_info:name(AppInfo)]),
diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl
index b58800a..df3a271 100644
--- a/src/rebar_prv_escriptize.erl
+++ b/src/rebar_prv_escriptize.erl
@@ -72,7 +72,7 @@ do(State) ->
end;
Name ->
AllApps = rebar_state:all_deps(State)++rebar_state:project_apps(State),
- AppInfo = rebar_app_utils:find(Name, AllApps),
+ {ok, AppInfo} = rebar_app_utils:find(ec_cnv:to_binary(Name), AllApps),
escriptize(State, AppInfo)
end.
@@ -83,6 +83,7 @@ escriptize(State0, App) ->
%% Get the output filename for the escript -- this may include dirs
Filename = filename:join([rebar_dir:base_dir(State0), "bin",
rebar_state:get(State0, escript_name, AppName)]),
+ ?DEBUG("Creating escript file ~s", [Filename]),
ok = filelib:ensure_dir(Filename),
State = rebar_state:escript_path(State0, Filename),