Better reporting on failures resolving dependencies

This commit is contained in:
Jano at Zelda
2018-02-02 16:48:31 +01:00
parent 85e172d648
commit 502557a33f
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ package body Alire.OS_Lib is
function Spawn (Command : String;
Arguments : String := "") return Integer is
begin
Log ("Spawning: " & Command & " " & Arguments, Verbose);
Log ("Spawning: " & Command & " " & Arguments, Debug);
return
(Spawn (Locate_In_Path (Command),
Argument_String_To_List (Arguments).all));
+7 -3
View File
@@ -25,7 +25,7 @@ package body Alire.Query is
use Containers.Project_Release_Maps;
begin
for Rel of I loop
Log (" " & Rel.Milestone_Image);
Log (" " & Rel.Milestone_Image, Verbose);
end loop;
end Print_Solution;
@@ -57,7 +57,7 @@ package body Alire.Query is
is
begin
if Unresolved.Is_Empty then
Log ("Dependency solution found.");
Log ("Dependencies resolved");
Print_Solution (Frozen);
return Frozen;
else
@@ -115,7 +115,11 @@ package body Alire.Query is
begin
Success := False;
return Resolve (Deps, Containers.Project_Release_Maps.Empty_Map, Success);
return I : constant Instance := Resolve (Deps, Containers.Project_Release_Maps.Empty_Map, Success) do
if not Success then
Log ("Dependency resolution failed");
end if;
end return;
end Resolve;
end Alire.Query;
+2 -2
View File
@@ -8,8 +8,8 @@ package body Alire is
GNAT.IO.Put_Line
((case Level is
when Terse => "",
when Verbose => "> ",
when Debug => ">> ") & S);
when Verbose => "-> ",
when Debug => "-->> ") & S);
end if;
end Log;