summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_compiler.erl7
-rw-r--r--src/rebar_paths.erl13
-rw-r--r--src/rebar_prv_compile.erl2
3 files changed, 10 insertions, 12 deletions
diff --git a/src/rebar_compiler.erl b/src/rebar_compiler.erl
index c2c514a..6e94cb2 100644
--- a/src/rebar_compiler.erl
+++ b/src/rebar_compiler.erl
@@ -34,11 +34,10 @@
-define(RE_PREFIX, "^(?!\\._)").
compile_all(Compilers, AppInfo) ->
- OutDir = rebar_utils:to_list(rebar_app_info:out_dir(AppInfo)),
-
+ EbinDir = rebar_utils:to_list(rebar_app_info:ebin_dir(AppInfo)),
%% Make sure that outdir is on the path
- ok = rebar_file_utils:ensure_dir(OutDir),
- true = code:add_patha(filename:absname(OutDir)),
+ ok = rebar_file_utils:ensure_dir(EbinDir),
+ true = code:add_patha(filename:absname(EbinDir)),
%% necessary for erlang:function_exported/3 to work as expected
%% called here for clarity as it's required by both opts_changed/2
diff --git a/src/rebar_paths.erl b/src/rebar_paths.erl
index bb43897..71f0016 100644
--- a/src/rebar_paths.erl
+++ b/src/rebar_paths.erl
@@ -130,11 +130,10 @@ misloaded_modules(Mods, GoodAppPaths, ModPaths) ->
%% Identify paths that are invalid; i.e. app paths that cover an
%% app in the desired group, but are not in the desired group.
lists:usort(
- [purge_mod(Mod)
- || Mod <- Mods,
- {_, Path} <- [lists:keyfind(Mod, 1, ModPaths)],
- is_list(Path), % not 'preloaded' or mocked
- not any_prefix(Path, GoodAppPaths)]
+ [Mod || Mod <- Mods,
+ {_, Path} <- [lists:keyfind(Mod, 1, ModPaths)],
+ is_list(Path), % not 'preloaded' or mocked
+ not any_prefix(Path, GoodAppPaths)]
).
any_prefix(Path, Paths) ->
@@ -168,10 +167,10 @@ get_apps(deps, State) ->
%% The code paths for deps also include the top level apps
%% and the extras, which we don't have here; we have to
%% add the apps by hand
- rebar_state:all_deps(State) ++
case rebar_state:project_apps(State) of
undefined -> [];
List -> List
- end;
+ end ++
+ rebar_state:all_deps(State);
get_apps(plugins, State) ->
rebar_state:all_plugin_deps(State).
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 405f73a..4b36636 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -115,7 +115,7 @@ copy_and_build_project_apps(State, Providers, Apps) ->
rebar_app_info:dir(AppInfo),
rebar_app_info:out_dir(AppInfo))
|| AppInfo <- Apps],
- code:add_pathsa([rebar_app_info:out_dir(AppInfo) || AppInfo <- Apps]),
+ code:add_pathsa([rebar_app_info:ebin_dir(AppInfo) || AppInfo <- Apps]),
[compile(State, Providers, AppInfo) || AppInfo <- Apps].