From 2068f31e201f4cf5dc75454e31d86a27538b0812 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Tue, 8 Aug 2023 11:29:43 +0200 Subject: [PATCH] Refactor Alire.Shared into Alire.Toolchains (#1423) --- src/alire/alire-roots.adb | 5 +- src/alire/alire-shared.adb | 267 ----------------------- src/alire/alire-shared.ads | 45 ---- src/alire/alire-solver.adb | 3 +- src/alire/alire-toolchains-solutions.adb | 7 +- src/alire/alire-toolchains.adb | 266 +++++++++++++++++++++- src/alire/alire-toolchains.ads | 39 +++- src/alr/alr-commands-toolchain.adb | 13 +- src/alr/alr-commands-version.adb | 4 +- 9 files changed, 312 insertions(+), 337 deletions(-) delete mode 100644 src/alire/alire-shared.adb delete mode 100644 src/alire/alire-shared.ads diff --git a/src/alire/alire-roots.adb b/src/alire/alire-roots.adb index 8eca2319..20b06506 100644 --- a/src/alire/alire-roots.adb +++ b/src/alire/alire-roots.adb @@ -14,7 +14,6 @@ with Alire.OS_Lib; with Alire.Paths.Vault; with Alire.Properties.Actions.Executor; with Alire.Roots.Optional; -with Alire.Shared; with Alire.Solutions.Diffs; with Alire.Spawn; with Alire.Toolchains; @@ -695,7 +694,7 @@ package body Alire.Roots is if Toolchains.Is_Tool (Rel) then -- Toolchain crates are installed to their own place - Shared.Share (Rel); + Toolchains.Deploy (Rel); else @@ -1295,7 +1294,7 @@ package body Alire.Roots is is begin if Toolchains.Is_Tool (Rel) then - return Shared.Path; + return Toolchains.Path; elsif Builds.Sandboxed_Dependencies then -- Note that, even for releases not requiring a build (e.g. -- externals), in sandboxed mode we are creating a folder for them diff --git a/src/alire/alire-shared.adb b/src/alire/alire-shared.adb deleted file mode 100644 index 37167dda..00000000 --- a/src/alire/alire-shared.adb +++ /dev/null @@ -1,267 +0,0 @@ -with Ada.Directories; - -with Alire.Config.Edit; -with Alire.Containers; -with Alire.Directories; -with Alire.Index; -with Alire.Manifest; -with Alire.Origins; -with Alire.Paths; -with Alire.Properties.Actions; -with Alire.Root; -with Alire.Toolchains.Solutions; -with Alire.Warnings; - -package body Alire.Shared is - - use Directories.Operators; - - use type Milestones.Milestone; - - --------------- - -- Available -- - --------------- - - function Available (Detect_Externals : Boolean := True) - return Releases.Containers.Release_Set is - - Result : Releases.Containers.Release_Set; - - ------------ - -- Detect -- - ------------ - - procedure Detect (Item : Ada.Directories.Directory_Entry_Type; - Stop : in out Boolean) - is - use Ada.Directories; - begin - Stop := False; - if Kind (Item) = Directory then - if Exists (Full_Name (Item) / Paths.Crate_File_Name) then - Trace.Debug ("Detected shared release at " - & TTY.URL (Full_Name (Item))); - - Result.Include - (Releases.From_Manifest - (File_Name => Full_Name (Item) / Paths.Crate_File_Name, - Source => Manifest.Index, - Strict => True)); - else - Warnings.Warn_Once ("Unexpected folder in shared crates path: " - & TTY.URL (Full_Name (Item))); - end if; - - else - Warnings.Warn_Once ("Unexpected file in shared crates path: " - & TTY.URL (Full_Name (Item))); - end if; - end Detect; - - begin - if Ada.Directories.Exists (Path) then - Directories.Traverse_Tree - (Start => Path, - Doing => Detect'Access); - end if; - - -- Include external toolchain members when they are in use - - for Tool of Toolchains.Tools loop - if Detect_Externals and then Toolchains.Tool_Is_External (Tool) then - Index.Detect_Externals (Tool, Root.Platform_Properties); - end if; - - for Release of Index.Releases_Satisfying (Toolchains.Any_Tool (Tool), - Root.Platform_Properties) - loop - if not Release.Origin.Is_Index_Provided then - Result.Include (Release); - end if; - end loop; - end loop; - - return Result; - end Available; - - ---------- - -- Path -- - ---------- - - function Path return String - is (Config.Edit.Cache_Path / "toolchains"); - - ----------- - -- Share -- - ----------- - - procedure Share (Release : Releases.Release; - Location : Any_Path := Path) - is - Already_Installed : Boolean := False; - - -------------------- - -- Is_Installable -- - -------------------- - - function Is_Installable return Boolean is - - -- We can install only regular releases. Also, releases that do not - -- have post-fetch actions (as they might involve using dependencies) - -- and dependencies simultaneously. I.e., post-fetch without - -- dependencies is OK, as it is having dependencies and no - -- post-fetch. Since "make" can be a pretty common single dependency - -- that does not cause problems, we make an exception for it. - - use Containers.Crate_Name_Sets; - Allowed_Dependencies : constant Containers.Crate_Name_Sets.Set := - To_Set (To_Name ("make")); - - begin - if Release.Dependencies.Is_Empty or else - (for all Dep of Release.Flat_Dependencies (Root.Platform_Properties) - => Allowed_Dependencies.Contains (Dep.Crate)) - then - return True; - end if; - - if Release.On_Platform_Actions - (Root.Platform_Properties, - (Properties.Actions.Post_Fetch => True, - others => False)).Is_Empty - then - return True; - end if; - - return False; - end Is_Installable; - - begin - - if not Is_Installable then - Recoverable_Error - ("Releases with both dependencies and post-fetch actions are not " - & " yet supported. (Use `" - & TTY.Terminal ("alr show ") & "` to examine " - & "release properties.)"); - end if; - - -- See if it can be skipped - if Location = Path and then Available.Contains (Release) then - Trace.Detail ("Skipping installation of already available release: " - & Release.Milestone.TTY_Image); - return; - end if; - - -- Deploy at the install location - - Release.Deploy (Env => Root.Platform_Properties, - Parent_Folder => Location, - Was_There => Already_Installed, - Perform_Actions => True, - Create_Manifest => True, - Include_Origin => True); - -- We need the origin to be included for the release to be recognized as - -- a binary-origin release. - - if Already_Installed then - Trace.Warning - ("Reused previous installation for existing release: " - & Release.Milestone.TTY_Image); - end if; - - Put_Info (Release.Milestone.TTY_Image & " installed successfully."); - end Share; - - ------------ - -- Remove -- - ------------ - - procedure Remove - (Release : Releases.Release; - Confirm : Boolean := not CLIC.User_Input.Not_Interactive) - is - use CLIC.User_Input; - Path : constant Absolute_Path := - Shared.Path / Release.Deployment_Folder; - begin - if not Release.Origin.Is_Index_Provided then - Raise_Checked_Error - ("Only regular releases deployed through Alire can be removed."); - end if; - - if not Ada.Directories.Exists (Path) then - Raise_Checked_Error - ("Directory slated for removal does not exist: " & TTY.URL (Path)); - end if; - - if Toolchains.Solutions.Is_In_Toolchain (Release) then - Recoverable_Error ("The release to be removed (" - & Release.Milestone.TTY_Image & ") is part of the " - & "configured default toolchain."); - - -- If forced: - Put_Warning ("Removing it anyway; it will be also removed from the " - & "default toolchain."); - - -- So remove it at any level. We currently do not have a way to know - -- from which level we have to remove this configuration. - Toolchains.Unconfigure (Release.Name, Config.Global, - Fail_If_Unset => False); - Toolchains.Unconfigure (Release.Name, Config.Local, - Fail_If_Unset => False); - end if; - - if not Confirm or else Query - (Question => "Release " & Release.Milestone.TTY_Image & " is going to " - & "be removed, freeing " - & Directories.TTY_Image (Directories.Tree_Size (Path)) - & ". Do you want to proceed?", - Valid => (No | Yes => True, others => False), - Default => Yes) = Yes - then - Directories.Force_Delete (Path); - Put_Success - ("Release " & Release.Milestone.TTY_Image - & " removed successfully"); - end if; - end Remove; - - ------------ - -- Remove -- - ------------ - - procedure Remove - (Target : Milestones.Milestone; - Confirm : Boolean := not CLIC.User_Input.Not_Interactive) - is - begin - for Release of Available loop - if Release.Milestone = Target then - Remove (Release, Confirm); - return; - end if; - end loop; - - Raise_Checked_Error - ("Requested release is not installed: " & Target.TTY_Image); - end Remove; - - ------------- - -- Release -- - ------------- - - function Release (Target : Milestones.Milestone; - Detect_Externals : Boolean := True) - return Releases.Release is - begin - for Release of Available (Detect_Externals) loop - if Release.Milestone = Target then - return Release; - end if; - end loop; - - raise Constraint_Error with "Not installed: " & Target.TTY_Image; - end Release; - -end Alire.Shared; diff --git a/src/alire/alire-shared.ads b/src/alire/alire-shared.ads deleted file mode 100644 index aabdba75..00000000 --- a/src/alire/alire-shared.ads +++ /dev/null @@ -1,45 +0,0 @@ -with Alire.Errors; -with Alire.Milestones; -with Alire.Releases.Containers; - -with CLIC.User_Input; - -package Alire.Shared is - - -- Since the new shared builds infrastructure, this applies exclusively - -- to releases that belong to a toolchain. TODO: migrate it to either - -- Alire.Toolchains or Alire.Toolchains.Shared. - - function Available (Detect_Externals : Boolean := True) - return Releases.Containers.Release_Set; - -- Returns the releases installed at the shared location - - function Release (Target : Milestones.Milestone; - Detect_Externals : Boolean := True) - return Releases.Release; - -- Retrieve the release corresponding to Target, if it exists. Will raise - -- Constraint_Error if not among Available. - - function Path return Any_Path; - -- Returns the base folder in which all shared releases live, defaults to - -- /toolchains - - procedure Share (Release : Releases.Release; - Location : Any_Path := Path); - -- Deploy a release in the specified location - - procedure Remove - (Release : Releases.Release; - Confirm : Boolean := not CLIC.User_Input.Not_Interactive) - with Pre => Available.Contains (Release) - or else raise Checked_Error with - Errors.Set ("Requested release is not installed: " - & Release.Milestone.TTY_Image); - -- Remove a release from the shared location for the configuration - - procedure Remove - (Target : Milestones.Milestone; - Confirm : Boolean := not CLIC.User_Input.Not_Interactive); - -- Behaves as the previous Remove - -end Alire.Shared; diff --git a/src/alire/alire-solver.adb b/src/alire/alire-solver.adb index 98241455..fe6adab4 100644 --- a/src/alire/alire-solver.adb +++ b/src/alire/alire-solver.adb @@ -10,7 +10,6 @@ with Alire.Milestones; with Alire.Optional; with Alire.Platforms.Current; with Alire.Releases.Containers; -with Alire.Shared; with Alire.Root; with Alire.Toolchains; with Alire.Utils.TTY; @@ -259,7 +258,7 @@ package body Alire.Solver is -- solution is found). Installed : constant Releases.Containers.Release_Set := - Shared.Available + Toolchains.Available (Detect_Externals => Options.Detecting = Detect); -- Installed releases do not change during resolution, we make a local diff --git a/src/alire/alire-toolchains-solutions.adb b/src/alire/alire-toolchains-solutions.adb index 2d2e79ef..29414f43 100644 --- a/src/alire/alire-toolchains-solutions.adb +++ b/src/alire/alire-toolchains-solutions.adb @@ -2,7 +2,6 @@ with AAA.Strings; with Alire.Index; with Alire.Root; -with Alire.Shared; package body Alire.Toolchains.Solutions is @@ -22,14 +21,14 @@ package body Alire.Toolchains.Solutions is use type Milestones.Milestone; begin -- Check that is not already there - if (for some Rel of Shared.Available => Rel.Milestone = Mil) then + if (for some Rel of Toolchains.Available => Rel.Milestone = Mil) then return; end if; -- It must be redeployed Put_Warning ("Tool " & Mil.TTY_Image & " is missing, redeploying..."); - Shared.Share (Index.Find (Mil.Crate, Mil.Version)); + Toolchains.Deploy (Index.Find (Mil.Crate, Mil.Version)); end Redeploy_If_Needed; Result : Alire.Solutions.Solution := Solution; @@ -53,7 +52,7 @@ package body Alire.Toolchains.Solutions is -- Add the configured tool release to the solution Result := Result.Including - (Release => Shared.Release + (Release => Toolchains.Release (Target => Tool_Milestone (Tool), Detect_Externals => Tool_Is_External (Tool)), Env => Root.Platform_Properties, diff --git a/src/alire/alire-toolchains.adb b/src/alire/alire-toolchains.adb index 99039c60..9fc3e7d8 100644 --- a/src/alire/alire-toolchains.adb +++ b/src/alire/alire-toolchains.adb @@ -1,17 +1,21 @@ with AAA.Text_IO; with Ada.Containers.Indefinite_Vectors; +with Ada.Directories; with Alire.Config.Edit; +with Alire.Containers; +with Alire.Directories; with Alire.Index; +with Alire.Manifest; with Alire.Origins; +with Alire.Paths; with Alire.Platforms.Current; -with Alire.Properties; -with Alire.Releases.Containers; +with Alire.Properties.Actions; with Alire.Root; -with Alire.Shared; +with Alire.Toolchains.Solutions; +with Alire.Warnings; -with CLIC.User_Input; with CLIC.Config.Edit; with Semantic_Versioning.Extended; @@ -191,7 +195,7 @@ package body Alire.Toolchains is -- Deploy as a shared install unless external if Release.Origin.Is_Index_Provided then - Shared.Share (Release); + Toolchains.Deploy (Release); else Trace.Debug ("The user selected a external version as default for " @@ -441,7 +445,7 @@ package body Alire.Toolchains is Raise_Checked_Error ("Requested tool is not configured: " & Utils.TTY.Name (Crate)); else - return Shared.Release (Tool_Milestone (Crate)); + return Toolchains.Release (Tool_Milestone (Crate)); end if; exception when E : Constraint_Error => @@ -477,4 +481,254 @@ package body Alire.Toolchains is end if; end Unconfigure; + use Directories.Operators; + + use type Milestones.Milestone; + + --------------- + -- Available -- + --------------- + + function Available (Detect_Externals : Boolean := True) + return Releases.Containers.Release_Set is + + Result : Releases.Containers.Release_Set; + + ------------ + -- Detect -- + ------------ + + procedure Detect (Item : Ada.Directories.Directory_Entry_Type; + Stop : in out Boolean) + is + use Ada.Directories; + begin + Stop := False; + if Kind (Item) = Directory then + if Exists (Full_Name (Item) / Paths.Crate_File_Name) then + Trace.Debug ("Detected shared release at " + & TTY.URL (Full_Name (Item))); + + Result.Include + (Releases.From_Manifest + (File_Name => Full_Name (Item) / Paths.Crate_File_Name, + Source => Manifest.Index, + Strict => True)); + else + Warnings.Warn_Once ("Unexpected folder in shared crates path: " + & TTY.URL (Full_Name (Item))); + end if; + + else + Warnings.Warn_Once ("Unexpected file in shared crates path: " + & TTY.URL (Full_Name (Item))); + end if; + end Detect; + + begin + if Ada.Directories.Exists (Path) then + Directories.Traverse_Tree + (Start => Path, + Doing => Detect'Access); + end if; + + -- Include external toolchain members when they are in use + + for Tool of Toolchains.Tools loop + if Detect_Externals and then Toolchains.Tool_Is_External (Tool) then + Index.Detect_Externals (Tool, Root.Platform_Properties); + end if; + + for Release of Index.Releases_Satisfying (Toolchains.Any_Tool (Tool), + Root.Platform_Properties) + loop + if not Release.Origin.Is_Index_Provided then + Result.Include (Release); + end if; + end loop; + end loop; + + return Result; + end Available; + + ---------- + -- Path -- + ---------- + + function Path return String + is (Config.Edit.Cache_Path / "toolchains"); + + ------------ + -- Deploy -- + ------------ + + procedure Deploy (Release : Releases.Release; + Location : Any_Path := Path) + is + Already_Installed : Boolean := False; + + -------------------- + -- Is_Installable -- + -------------------- + + function Is_Installable return Boolean is + + -- We can install only regular releases. Also, releases that do not + -- have post-fetch actions (as they might involve using dependencies) + -- and dependencies simultaneously. I.e., post-fetch without + -- dependencies is OK, as it is having dependencies and no + -- post-fetch. Since "make" can be a pretty common single dependency + -- that does not cause problems, we make an exception for it. + + use Containers.Crate_Name_Sets; + Allowed_Dependencies : constant Containers.Crate_Name_Sets.Set := + To_Set (To_Name ("make")); + + begin + if Release.Dependencies.Is_Empty or else + (for all Dep of Release.Flat_Dependencies (Root.Platform_Properties) + => Allowed_Dependencies.Contains (Dep.Crate)) + then + return True; + end if; + + if Release.On_Platform_Actions + (Root.Platform_Properties, + (Properties.Actions.Post_Fetch => True, + others => False)).Is_Empty + then + return True; + end if; + + return False; + end Is_Installable; + + begin + + if not Is_Installable then + Recoverable_Error + ("Releases with both dependencies and post-fetch actions are not " + & " yet supported. (Use `" + & TTY.Terminal ("alr show ") & "` to examine " + & "release properties.)"); + end if; + + -- See if it can be skipped + if Location = Path and then Available.Contains (Release) then + Trace.Detail ("Skipping installation of already available release: " + & Release.Milestone.TTY_Image); + return; + end if; + + -- Deploy at the install location + + Release.Deploy (Env => Root.Platform_Properties, + Parent_Folder => Location, + Was_There => Already_Installed, + Perform_Actions => True, + Create_Manifest => True, + Include_Origin => True); + -- We need the origin to be included for the release to be recognized as + -- a binary-origin release. + + if Already_Installed then + Trace.Warning + ("Reused previous installation for existing release: " + & Release.Milestone.TTY_Image); + end if; + + Put_Info (Release.Milestone.TTY_Image & " installed successfully."); + end Deploy; + + ------------ + -- Remove -- + ------------ + + procedure Remove + (Release : Releases.Release; + Confirm : Boolean := not CLIC.User_Input.Not_Interactive) + is + use CLIC.User_Input; + Path : constant Absolute_Path := + Toolchains.Path / Release.Deployment_Folder; + begin + if not Release.Origin.Is_Index_Provided then + Raise_Checked_Error + ("Only regular releases deployed through Alire can be removed."); + end if; + + if not Ada.Directories.Exists (Path) then + Raise_Checked_Error + ("Directory slated for removal does not exist: " & TTY.URL (Path)); + end if; + + if Toolchains.Solutions.Is_In_Toolchain (Release) then + Recoverable_Error ("The release to be removed (" + & Release.Milestone.TTY_Image & ") is part of the " + & "configured default toolchain."); + + -- If forced: + Put_Warning ("Removing it anyway; it will be also removed from the " + & "default toolchain."); + + -- So remove it at any level. We currently do not have a way to know + -- from which level we have to remove this configuration. + Toolchains.Unconfigure (Release.Name, Config.Global, + Fail_If_Unset => False); + Toolchains.Unconfigure (Release.Name, Config.Local, + Fail_If_Unset => False); + end if; + + if not Confirm or else Query + (Question => "Release " & Release.Milestone.TTY_Image & " is going to " + & "be removed, freeing " + & Directories.TTY_Image (Directories.Tree_Size (Path)) + & ". Do you want to proceed?", + Valid => (No | Yes => True, others => False), + Default => Yes) = Yes + then + Directories.Force_Delete (Path); + Put_Success + ("Release " & Release.Milestone.TTY_Image + & " removed successfully"); + end if; + end Remove; + + ------------ + -- Remove -- + ------------ + + procedure Remove + (Target : Milestones.Milestone; + Confirm : Boolean := not CLIC.User_Input.Not_Interactive) + is + begin + for Release of Available loop + if Release.Milestone = Target then + Remove (Release, Confirm); + return; + end if; + end loop; + + Raise_Checked_Error + ("Requested release is not installed: " & Target.TTY_Image); + end Remove; + + ------------- + -- Release -- + ------------- + + function Release (Target : Milestones.Milestone; + Detect_Externals : Boolean := True) + return Releases.Release is + begin + for Release of Available (Detect_Externals) loop + if Release.Milestone = Target then + return Release; + end if; + end loop; + + raise Constraint_Error with "Not installed: " & Target.TTY_Image; + end Release; + end Alire.Toolchains; diff --git a/src/alire/alire-toolchains.ads b/src/alire/alire-toolchains.ads index 32ae9bcd..ac4ee2f4 100644 --- a/src/alire/alire-toolchains.ads +++ b/src/alire/alire-toolchains.ads @@ -4,12 +4,14 @@ with AAA.Strings; with Alire.Config; with Alire.Dependencies; +with Alire.Errors; with Alire.Milestones; -with Alire.Releases; +with Alire.Releases.Containers; with Alire.Utils; with Alire.Utils.TTY; with CLIC.Config; +with CLIC.User_Input; package Alire.Toolchains is @@ -109,6 +111,41 @@ package Alire.Toolchains is & "additional details about compiler dependencies and toolchain " & "interactions."); + -- From here on, these are former Alire.Shared subprograms, so they were + -- more generally oriented. + + function Available (Detect_Externals : Boolean := True) + return Releases.Containers.Release_Set; + -- Returns tools installed at the toolchain location + + function Release (Target : Milestones.Milestone; + Detect_Externals : Boolean := True) + return Releases.Release; + -- Retrieve the release corresponding to Target, if it exists. Will raise + -- Constraint_Error if not among Available. + + function Path return Any_Path; + -- Returns the base folder in which all shared releases live, defaults to + -- /toolchains + + procedure Deploy (Release : Releases.Release; + Location : Any_Path := Path); + -- Deploy a release in the specified location + + procedure Remove + (Release : Releases.Release; + Confirm : Boolean := not CLIC.User_Input.Not_Interactive) + with Pre => Available.Contains (Release) + or else raise Checked_Error with + Errors.Set ("Requested release is not installed: " + & Release.Milestone.TTY_Image); + -- Remove a release from the shared location for the configuration + + procedure Remove + (Target : Milestones.Milestone; + Confirm : Boolean := not CLIC.User_Input.Not_Interactive); + -- Behaves as the previous Remove + private ----------------------- diff --git a/src/alr/alr-commands-toolchain.adb b/src/alr/alr-commands-toolchain.adb index a4f36b2f..9a551623 100644 --- a/src/alr/alr-commands-toolchain.adb +++ b/src/alr/alr-commands-toolchain.adb @@ -10,7 +10,6 @@ with Alire.Errors; with Alire.Milestones; with Alire.Origins.Deployers; with Alire.Releases.Containers; -with Alire.Shared; with Alire.Solver; with Alire.Toolchains; with Alire.Utils; use Alire.Utils; @@ -245,7 +244,7 @@ package body Alr.Commands.Toolchain is if Cmd.Install_Dir.all /= "" then if Rel.Origin.Is_Index_Provided then - Shared.Share (Rel, Cmd.Install_Dir.all); + Toolchains.Deploy (Rel, Cmd.Install_Dir.all); else Reportaise_Command_Failed ("Releases with external origins cannot be installed at " @@ -254,7 +253,7 @@ package body Alr.Commands.Toolchain is end if; else if Rel.Origin.Is_Index_Provided then - Shared.Share (Rel); + Toolchains.Deploy (Rel); elsif Rel.Origin.Is_System then Origins.Deployers.Deploy (Rel).Assert; elsif Rel.Origin.Kind = External then @@ -307,7 +306,7 @@ package body Alr.Commands.Toolchain is -- Even if we have selected a non-external toolchain, in this case we -- want to force detection of external toolchains to be aware of them. - if Alire.Shared.Available.Is_Empty then + if Alire.Toolchains.Available.Is_Empty then Trace.Info ("Nothing installed in configuration prefix " & TTY.URL (Alire.Config.Edit.Path)); return; @@ -320,7 +319,7 @@ package body Alr.Commands.Toolchain is .Append (TTY.Emph ("NOTES")) .New_Row; - for Dep of Alire.Shared.Available loop + for Dep of Alire.Toolchains.Available loop if (for some Crate of Toolchains.Tools => Dep.Provides (Crate)) then @@ -361,7 +360,7 @@ package body Alr.Commands.Toolchain is -- Obtain all installed releases for the crate; we will proceed if -- only one exists. Available : constant Alire.Releases.Containers.Release_Set := - Alire.Shared.Available.Satisfying + Alire.Toolchains.Available.Satisfying (Alire.Dependencies.New_Dependency (Crate => Alire.To_Name (Target), Versions => Semantic_Versioning.Extended.Any)); @@ -390,7 +389,7 @@ package body Alr.Commands.Toolchain is -- Otherwise we proceed with a complete milestone - Alire.Shared.Remove (Alire.Milestones.New_Milestone (Target)); + Alire.Toolchains.Remove (Alire.Milestones.New_Milestone (Target)); end Uninstall; diff --git a/src/alr/alr-commands-version.adb b/src/alr/alr-commands-version.adb index 74999d95..6f5933fe 100644 --- a/src/alr/alr-commands-version.adb +++ b/src/alr/alr-commands-version.adb @@ -7,7 +7,6 @@ with Alire.Milestones; with Alire.Paths.Vault; with Alire.Properties; with Alire.Roots.Optional; -with Alire.Shared; with Alire.Toolchains; with Alire.Utils.Tables; @@ -94,7 +93,8 @@ package body Alr.Commands.Version is & AAA.Strings.Trim (Index.Priority'Image) & ":") .Append ("(" & Index.Name & ") " & Index.Origin).New_Row; end loop; - Table.Append ("toolchain folder:").Append (Alire.Shared.Path).New_Row; + Table.Append ("toolchain folder:") + .Append (Alire.Toolchains.Path).New_Row; Table.Append ("toolchain assistant:") .Append (if Alire.Toolchains.Assistant_Enabled then "enabled" -- 2.39.5