summaryrefslogtreecommitdiff
path: root/src/rebar_prv_install_deps.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-11-25 21:32:43 -0500
committerFred Hebert <mononcqc@ferd.ca>2016-11-27 20:59:56 -0500
commit3da4cc222197e01886d3baaeca7a380e02ff3125 (patch)
treed49eefc436143cb9dc4f401257f55e0e8e61b30e /src/rebar_prv_install_deps.erl
parent252634d31e51d8896f0e17e1af5e91de964dd555 (diff)
Type specifications and edocs improvements
Includes improvments and function documentation for all modules (in alphabetical order) up to rebar_core, and may have included more in other modules as I saw fit to dig and understand more of the internals.
Diffstat (limited to 'src/rebar_prv_install_deps.erl')
-rw-r--r--src/rebar_prv_install_deps.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index a8a7ea0..9c5e8ac 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -101,6 +101,7 @@ do_(State) ->
{error, Reason}
end.
+%% @doc convert a given exception's payload into an io description.
-spec format_error(any()) -> iolist().
format_error({dep_app_not_found, AppDir, AppName}) ->
io_lib:format("Dependency failure: Application ~s not found at the top level of directory ~s", [AppName, AppDir]);
@@ -125,8 +126,14 @@ format_error({cycles, Cycles}) ->
format_error(Reason) ->
io_lib:format("~p", [Reason]).
-%% Allows other providers to install deps in a given profile
+%% @doc Allows other providers to install deps in a given profile
%% manually, outside of what is provided by rebar3's deps tuple.
+-spec handle_deps_as_profile(Profile, State, Deps, Upgrade) -> {Apps, State} when
+ Profile :: atom(),
+ State :: rebar_state:t(),
+ Deps :: [tuple() | atom() | binary()], % TODO: meta to source() | lock()
+ Upgrade :: boolean(),
+ Apps :: [rebar_app_info:t()].
handle_deps_as_profile(Profile, State, Deps, Upgrade) ->
Locks = [],
Level = 0,