summaryrefslogtreecommitdiff
path: root/src/rebar_prv_install_deps.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-12-23 14:17:13 -0500
committerGitHub <noreply@github.com>2016-12-23 14:17:13 -0500
commit768a7c5c3096583059ae036b40fbe9c692d5eebe (patch)
tree7767e6f7d1ecb7c4341c693cb04aac293386a0cd /src/rebar_prv_install_deps.erl
parenta1a8387a191514ac0b939c23d10e34b49480dfd8 (diff)
parent8ae17c483d86f151d69091546b3577381662e27e (diff)
Merge pull request #1391 from ferd/doc-and-types
Type specifications and edocs improvements
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 84a0563..c9fe0ad 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,