Bläddra i källkod

add additional comments

pull/471/head
Tristan Sloughter 10 år sedan
förälder
incheckning
e45c67b023
3 ändrade filer med 9 tillägg och 0 borttagningar
  1. +3
    -0
      src/rebar_app_discover.erl
  2. +3
    -0
      src/rebar_digraph.erl
  3. +3
    -0
      src/rebar_prv_install_deps.erl

+ 3
- 0
src/rebar_app_discover.erl Visa fil

@ -153,6 +153,8 @@ dedup([A]) -> [A];
dedup([H,H|T]) -> dedup([H|T]);
dedup([H|T]) -> [H|dedup(T)].
%% Read in and parse the .app file if it is availabe. Do the same for
%% the .app.src file if it exists.
try_handle_app_file([], AppDir, AppSrcFile, Validate) ->
try_handle_app_src_file([], AppDir, AppSrcFile, Validate);
try_handle_app_file([File], AppDir, AppSrcFile, Validate) ->
@ -193,6 +195,7 @@ try_handle_app_file([File], AppDir, AppSrcFile, Validate) ->
try_handle_app_file(Other, _AppDir, _AppSrcFile, _Validate) ->
throw({error, {multiple_app_files, Other}}).
%% Read in the .app.src file if we aren't looking for a valid (already built) app
try_handle_app_src_file(_, _AppDir, [], _Validate) ->
false;
try_handle_app_src_file(_, _AppDir, _AppSrcFile, valid) ->

+ 3
- 0
src/rebar_digraph.erl Visa fil

@ -124,6 +124,9 @@ find_app_by_name(Name, Apps) ->
rebar_app_info:name(App) =:= Name
end, Apps).
%% The union of all entries in the applications list for an app and
%% the deps listed in its rebar.config is all deps that may be needed
%% for building the app.
all_apps_deps(App) ->
Applications = lists:usort([atom_to_binary(X, utf8) || X <- rebar_app_info:applications(App)]),
Deps = lists:usort(lists:map(fun({Name, _}) -> Name; (Name) -> Name end, rebar_app_info:deps(App))),

+ 3
- 0
src/rebar_prv_install_deps.erl Visa fil

@ -575,6 +575,9 @@ fetch_app(AppInfo, AppDir, State) ->
throw(Error)
end.
%% This is called after the dep has been downloaded and unpacked, if it hadn't been already.
%% So this is the first time for newly downloaded apps that its .app/.app.src data can
%% be read in an parsed.
update_app_info(AppDir, AppInfo) ->
{ok, Found} = rebar_app_info:discover(AppDir),
AppDetails = rebar_app_info:app_details(Found),

Laddar…
Avbryt
Spara