Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rebar_fetch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ download_source(AppInfo, State) ->
{true, AppInfo2} ->
rebar_app_info:is_available(AppInfo2, true);
false ->
throw(?PRV_ERROR({dep_app_not_found, rebar_app_info:name(AppInfo1)}))
rebar_app_info:is_available(AppInfo1, true)
end;
{error, Reason} ->
throw(?PRV_ERROR(Reason))
Expand Down
12 changes: 12 additions & 0 deletions src/rebar_prv_compile.erl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ compile(State, Providers, AppInfo) ->

AppInfo2 = rebar_hooks:run_all_hooks(AppDir, pre, ?ERLC_HOOK, Providers, AppInfo1, State),

%% For non-rebar3 built deps the proper app structure should be created by pre-hooks
%% by this time. Verify that.
ok = verify_app_structure(AppInfo2, AppDir),

build_app(AppInfo2, State),

AppInfo3 = rebar_hooks:run_all_hooks(AppDir, post, ?ERLC_HOOK, Providers, AppInfo2, State),
Expand Down Expand Up @@ -214,6 +218,14 @@ build_app(AppInfo, State) ->
end
end.

verify_app_structure(AppInfo, AppDir) ->
case rebar_app_discover:find_app(AppInfo, AppDir, all) of
{true, _AppInfo1} ->
ok;
false ->
throw(?PRV_ERROR({dep_app_not_found, rebar_app_info:name(AppInfo)}))
end.

update_code_paths(State, ProjectApps) ->
ProjAppsPaths = paths_for_apps(ProjectApps),
ExtrasPaths = paths_for_extras(State, ProjectApps),
Expand Down