mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Return more descriptive dependency errors
This commit is contained in:
parent
9441251f9f
commit
422beee324
1 changed files with 7 additions and 4 deletions
|
@ -247,16 +247,19 @@ is_app_available(App, VsnRegex, Path) ->
|
||||||
nomatch ->
|
nomatch ->
|
||||||
?WARN("~s has version ~p; requested regex was ~s\n",
|
?WARN("~s has version ~p; requested regex was ~s\n",
|
||||||
[AppFile, Vsn, VsnRegex]),
|
[AppFile, Vsn, VsnRegex]),
|
||||||
{false, version_mismatch}
|
{false, {version_mismatch,
|
||||||
|
{AppFile,
|
||||||
|
{expected, VsnRegex}, {has, Vsn}}}}
|
||||||
end;
|
end;
|
||||||
OtherApp ->
|
OtherApp ->
|
||||||
?WARN("~s has application id ~p; expected ~p\n", [AppFile, OtherApp, App]),
|
?WARN("~s has application id ~p; expected ~p\n", [AppFile, OtherApp, App]),
|
||||||
{false, name_mismatch}
|
{false, {name_mismatch,
|
||||||
|
{AppFile, {expected, App}, {has, OtherApp}}}}
|
||||||
end;
|
end;
|
||||||
false ->
|
false ->
|
||||||
?WARN("Expected ~s to be an app dir (containing ebin/*.app), but no .app found.\n",
|
?WARN("Expected ~s to be an app dir (containing ebin/*.app), but no .app found.\n",
|
||||||
[Path]),
|
[Path]),
|
||||||
{false, missing_app_file}
|
{false, {missing_app_file, Path}}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
use_source(Dep) ->
|
use_source(Dep) ->
|
||||||
|
@ -280,7 +283,7 @@ use_source(Dep, Count) ->
|
||||||
%% The app that was downloaded doesn't match up (or had
|
%% The app that was downloaded doesn't match up (or had
|
||||||
%% errors or something). For the time being, abort.
|
%% errors or something). For the time being, abort.
|
||||||
?ABORT("Dependency dir ~s failed application validation "
|
?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;
|
end;
|
||||||
false ->
|
false ->
|
||||||
?CONSOLE("Pulling ~p from ~p\n", [Dep#dep.app, Dep#dep.source]),
|
?CONSOLE("Pulling ~p from ~p\n", [Dep#dep.app, Dep#dep.source]),
|
||||||
|
|
Loading…
Reference in a new issue