aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_depsolver_culprit.erl
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2014-11-06 09:21:41 -0800
committerJordan Wilberding <[email protected]>2014-11-06 09:21:41 -0800
commit75b44fa44ef70e078dd450bf68bfaea4d48bf4e3 (patch)
treec91e2cb7d92232a7f216e1c8b19eadba3aacd17b /src/rlx_depsolver_culprit.erl
parent655b54a45c5d1a2e319841408c0b5431ea0cd9e2 (diff)
parent79bbf33cbd46c9a1beeae00424e14969608385ba (diff)
downloadrelx-75b44fa44ef70e078dd450bf68bfaea4d48bf4e3.tar.gz
relx-75b44fa44ef70e078dd450bf68bfaea4d48bf4e3.tar.bz2
relx-75b44fa44ef70e078dd450bf68bfaea4d48bf4e3.zip
Merge pull request #252 from tsloughter/master
Split app and release discovery and format_error fix
Diffstat (limited to 'src/rlx_depsolver_culprit.erl')
-rw-r--r--src/rlx_depsolver_culprit.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rlx_depsolver_culprit.erl b/src/rlx_depsolver_culprit.erl
index cf6dcb2..4448777 100644
--- a/src/rlx_depsolver_culprit.erl
+++ b/src/rlx_depsolver_culprit.erl
@@ -31,7 +31,7 @@
-module(rlx_depsolver_culprit).
-export([search/3,
- format_error/1,
+ format_error/2,
format_version/1,
format_constraint/1,
format_roots/1,
@@ -68,19 +68,19 @@ search(State, ActiveCons, [NewCon | Constraints]) ->
search(State, [NewCon | ActiveCons], Constraints)
end.
-format_error({error, {unreachable_package, AppName}}) ->
+format_error({error, {unreachable_package, AppName}}, _) ->
["Dependency ", format_constraint(AppName), " is specified as a dependency ",
"but is not reachable by the system.\n"];
-format_error({error, {invalid_constraints, Constraints}}) ->
+format_error({error, {invalid_constraints, Constraints}}, _) ->
["Invalid constraint ", add_s(Constraints), " specified ",
lists:foldl(fun(Con, "") ->
[io_lib:format("~p", [Con])];
(Con, Acc) ->
[io_lib:format("~p", [Con]), ", " | Acc]
end, "", Constraints)];
-format_error({error, Detail}) ->
- format_error(Detail);
-format_error(Details) when erlang:is_list(Details) ->
+format_error({error, Detail}, State) ->
+ format_error(Detail, State);
+format_error(Details, _) when erlang:is_list(Details) ->
["Unable to solve constraints, the following solutions were attempted \n\n",
[[format_error_path(" ", Detail)] || Detail <- Details]].