From 6f5a5c7b57be07488388f89934686bc00752dfb6 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Fri, 9 Mar 2018 12:05:32 +0100 Subject: [PATCH] Root_Project -> Root_Release --- src/alire-index.ads | 12 ++++-------- src/alire-project.ads | 7 ------- ...alire-root_project.adb => alire-root_release.adb} | 0 ...alire-root_project.ads => alire-root_release.ads} | 8 +++----- 4 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 src/alire-project.ads rename src/{alire-root_project.adb => alire-root_release.adb} (100%) rename src/{alire-root_project.ads => alire-root_release.ads} (73%) diff --git a/src/alire-index.ads b/src/alire-index.ads index 743c837c..b9859067 100644 --- a/src/alire-index.ads +++ b/src/alire-index.ads @@ -15,7 +15,7 @@ with Alire.Releases; with Alire.Requisites; with Alire.Requisites.Dependencies; with Alire.Requisites.Platform; -with Alire.Root_Project; +with Alire.Root_Release; with Alire.Utils; with Semantic_Versioning; @@ -249,14 +249,10 @@ package Alire.Index is function Word_Size is new Requisites.Platform.Word_Sizes.Factory; use all type Requisites.Platform.Word_Sizes.Comparable; - ---------------------- - -- Set_Root_Project -- - ---------------------- - - function Set_Root_Project (Project : Alire.Project_Name; - Version : Semantic_Versioning.Version; + function Set_Root_Release (Project : Alire.Project_Name; + Version : Semantic_Versioning.Version; Dependencies : Conditional.Dependencies := No_Dependencies) - return Release renames Root_Project.Set; + return Release renames Root_Release.Set; -- This function must be called in the working project alire file. -- Otherwise alr does not know what's the current project, and its version and dependencies -- The returned Release is the same; this is just a trick to be able to use it in an spec file. diff --git a/src/alire-project.ads b/src/alire-project.ads deleted file mode 100644 index dc1920cb..00000000 --- a/src/alire-project.ads +++ /dev/null @@ -1,7 +0,0 @@ -with Alire.Index; - -package Alire.Project renames Alire.Index; - --- Since the facilities used to register projects in the index are the same used --- by a working project to state dependencies, instead of duplicating them or --- forcing clients to with everything around, everything is done inside Index diff --git a/src/alire-root_project.adb b/src/alire-root_release.adb similarity index 100% rename from src/alire-root_project.adb rename to src/alire-root_release.adb diff --git a/src/alire-root_project.ads b/src/alire-root_release.ads similarity index 73% rename from src/alire-root_project.ads rename to src/alire-root_release.ads index a520208b..0964c626 100644 --- a/src/alire-root_project.ads +++ b/src/alire-root_release.ads @@ -3,11 +3,9 @@ with Alire.Releases; with Semantic_Versioning; -package Alire.Root_Project is +package Alire.Root_Release is - -- Only file needed from the project alr file (project_alr.ads). - -- Besides the important Set_Root_Project, unfortunately it renames most of Alire.Index to - -- make it directly visible in project_alr.ads + -- When alr self-compiles it inserts a call to this function, so the dependency root is stablished function Set (Project : Project_Name; Version : Semantic_Versioning.Version; @@ -22,4 +20,4 @@ package Alire.Root_Project is function Is_Set return Boolean; -end Alire.Root_Project; +end Alire.Root_Release;