From 422beee324e24d5db404b9f61d26cceb73a9fcce Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 6 Jan 2011 14:51:35 +0100 Subject: [PATCH] Return more descriptive dependency errors --- src/rebar_deps.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index ded75db..72d982a 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -247,16 +247,19 @@ is_app_available(App, VsnRegex, Path) -> nomatch -> ?WARN("~s has version ~p; requested regex was ~s\n", [AppFile, Vsn, VsnRegex]), - {false, version_mismatch} + {false, {version_mismatch, + {AppFile, + {expected, VsnRegex}, {has, Vsn}}}} end; OtherApp -> ?WARN("~s has application id ~p; expected ~p\n", [AppFile, OtherApp, App]), - {false, name_mismatch} + {false, {name_mismatch, + {AppFile, {expected, App}, {has, OtherApp}}}} end; false -> ?WARN("Expected ~s to be an app dir (containing ebin/*.app), but no .app found.\n", [Path]), - {false, missing_app_file} + {false, {missing_app_file, Path}} end. use_source(Dep) -> @@ -280,7 +283,7 @@ use_source(Dep, Count) -> %% The app that was downloaded doesn't match up (or had %% errors or something). For the time being, abort. ?ABORT("Dependency dir ~s failed application validation " - "with reason ~p.\n", [Dep#dep.dir, Reason]) + "with reason:~n~p.\n", [Dep#dep.dir, Reason]) end; false -> ?CONSOLE("Pulling ~p from ~p\n", [Dep#dep.app, Dep#dep.source]),