diff options
| author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-06 14:51:35 +0100 | 
|---|---|---|
| committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-06 15:50:16 +0100 | 
| commit | 422beee324e24d5db404b9f61d26cceb73a9fcce (patch) | |
| tree | 20cf7abb54cd6b41f55fc53a9e083b74bf457d06 /src | |
| parent | 9441251f9fa7e214a35abd1b4d4eef85d4dc35c3 (diff) | |
Return more descriptive dependency errors
Diffstat (limited to 'src')
| -rw-r--r-- | src/rebar_deps.erl | 11 | 
1 files 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]),  | 
