Просмотр исходного кода

read in app information after fetch so we have the deps

pull/471/head
Tristan Sloughter 10 лет назад
Родитель
Сommit
37ac2b7833
2 измененных файлов: 8 добавлений и 6 удалений
  1. +4
    -3
      src/rebar_app_discover.erl
  2. +4
    -3
      src/rebar_prv_install_deps.erl

+ 4
- 3
src/rebar_app_discover.erl Просмотреть файл

@ -124,7 +124,8 @@ find_apps(LibDirs, Validate) ->
find_app(AppDir, Validate) ->
AppFile = filelib:wildcard(filename:join([AppDir, "ebin", "*.app"])),
AppSrcFile = filelib:wildcard(filename:join([AppDir, "src", "*.app.src"])),
try_handle_app_file(AppFile, AppDir, AppSrcFile, Validate).
AppInfo = try_handle_app_file(AppFile, AppDir, AppSrcFile, Validate),
AppInfo.
app_dir(AppFile) ->
filename:join(rebar_utils:droplast(filename:split(filename:dirname(AppFile)))).
@ -165,7 +166,7 @@ try_handle_app_file([File], AppDir, AppSrcFile, Validate) ->
AppInfo1;
Other when is_list(Other) ->
throw({error, {multiple_app_files, Other}})
end,
end,
case Validate of
valid ->
case rebar_app_utils:validate_application_info(AppInfo2) of
@ -197,7 +198,7 @@ try_handle_app_src_file(_, _AppDir, [], _Validate) ->
try_handle_app_src_file(_, _AppDir, _AppSrcFile, valid) ->
false;
try_handle_app_src_file(_, AppDir, [File], Validate) when Validate =:= invalid
; Validate =:= all ->
; Validate =:= all ->
AppInfo = create_app_info(AppDir, File),
case AppInfo of
{error, Reason} ->

+ 4
- 3
src/rebar_prv_install_deps.erl Просмотреть файл

@ -410,7 +410,7 @@ maybe_fetch(AppInfo, Profile, Upgrade, Seen, State) ->
case fetch_app(AppInfo, AppDir, State) of
true ->
maybe_symlink_default(State, Profile, AppDir, AppInfo),
{true, update_app_info(AppInfo)};
{true, update_app_info(AppDir, AppInfo)};
Other ->
{Other, AppInfo}
end;
@ -577,8 +577,9 @@ fetch_app(AppInfo, AppDir, State) ->
throw(Error)
end.
update_app_info(AppInfo) ->
AppDetails = rebar_app_info:app_details(AppInfo),
update_app_info(AppDir, AppInfo) ->
{true, Found} = rebar_app_discover:find_app(AppDir, all),
AppDetails = rebar_app_info:app_details(Found),
Applications = proplists:get_value(applications, AppDetails, []),
IncludedApplications = proplists:get_value(included_applications, AppDetails, []),
AppInfo1 = rebar_app_info:applications(

Загрузка…
Отмена
Сохранить