diff --git a/index/native/alire-index-gnat.ads b/index/native/alire-index-gnat.ads index 6b13eb78..d57d55f8 100644 --- a/index/native/alire-index-gnat.ads +++ b/index/native/alire-index-gnat.ads @@ -1,19 +1,25 @@ package Alire.Index.GNAT is - function Project is new Catalogued_Project (Projects.GNAT); +-- This is apparently a good idea but it is not, in practice +-- Since the compiler is a requisite of alr itself, there's no point in requiring it again here +-- Furthermore, the compiler might be installed but not be the one in use +-- (e.g., GPL version is in an earlier path) +-- Conclusion: use the requisite Compiler_Is_Native instead - -- If minor versions proved important they could be segregated with platform-specific knowledge - - V_8 : constant Release := - Project.Register - (V ("8"), - Native ((Debian | Ubuntu => Packaged_As ("gnat-8"), - others => Unavailable))); - - V_7 : constant Release := - Project.Register - (V ("7"), - Native ((Debian | Ubuntu => Packaged_As ("gnat-7"), - others => Unavailable))); +-- function Project is new Catalogued_Project (Projects.GNAT); +-- +-- -- If minor versions proved important they could be segregated with platform-specific knowledge +-- +-- V_8 : constant Release := +-- Project.Register +-- (V ("8"), +-- Native ((Debian | Ubuntu => Packaged_As ("gnat-8"), +-- others => Unavailable))); +-- +-- V_7 : constant Release := +-- Project.Register +-- (V ("7"), +-- Native ((Debian | Ubuntu => Packaged_As ("gnat-7"), +-- others => Unavailable))); end Alire.Index.GNAT; diff --git a/src/alire-index.ads b/src/alire-index.ads index 55e0acbd..2af51e9c 100644 --- a/src/alire-index.ads +++ b/src/alire-index.ads @@ -253,7 +253,7 @@ package Alire.Index is package Plat_Reqs renames Requisites.Platform; function Compiler is new Requisites.Platform.Compilers.Factory; --- function Compiler_Is_Native return Release_Requisites renames Plat_Reqs.Compiler_Is_Native; + function Compiler_Is_Native return Release_Requisites renames Plat_Reqs.Compiler_Is_Native; use all type Requisites.Platform.Compilers.Comparable; function Distribution is new Requisites.Platform.Distributions.Factory; diff --git a/src/alire-platform.adb b/src/alire-platform.adb index fb108710..1b134234 100644 --- a/src/alire-platform.adb +++ b/src/alire-platform.adb @@ -24,9 +24,9 @@ package body Alire.Platform is -- Set_Platform -- ------------------ - procedure Set_Platform (P : Supported_Platform'Class) is + procedure Set (P : Supported_Platform'Class) is begin This.Replace_Element (P); - end Set_Platform; + end Set; end Alire.Platform; diff --git a/src/alire-platform.ads b/src/alire-platform.ads index 7c382c38..ed0e96e5 100644 --- a/src/alire-platform.ads +++ b/src/alire-platform.ads @@ -9,7 +9,7 @@ package Alire.Platform with Preelaborate is function Package_Version (P : Supported_Platform; Origin : Origins.Origin) return String is abstract; - procedure Set_Platform (P : Supported_Platform'Class); + procedure Set (P : Supported_Platform'Class); function Current return Supported_Platform'Class with Pre => Platform'Elaborated; diff --git a/src/alire-platforms.ads b/src/alire-platforms.ads index 383a9499..287210a8 100644 --- a/src/alire-platforms.ads +++ b/src/alire-platforms.ads @@ -3,9 +3,12 @@ package Alire.Platforms with Preelaborate is -- Platform information necessary for some releases type Compilers is (GNAT_Unknown, + GNAT_FSF_7_X, -- Future proofing for Compiler_Is_Native GNAT_FSF_7_2, GNAT_FSF_7_3, - GNAT_GPL_2017); + GNAT_FSF_8_Or_Newer, -- More future proofing + GNAT_GPL_Unknown, + GNAT_GPL_2017,); type Operating_Systems is (GNU_Linux, Windows, diff --git a/src/alire-properties-dependencies.ads b/src/alire-properties-dependencies.ads index d845d34e..0b8c0cd2 100644 --- a/src/alire-properties-dependencies.ads +++ b/src/alire-properties-dependencies.ads @@ -26,7 +26,7 @@ private end record; overriding function Image (This : Availability_Checker) return String is - ("internal availability checker - OMG WHY ARE YOU SEEING THIS"); -- Don't think it should ever seen + ("Availability resolver"); function New_Property (Checker : Checker_Function; Props : Alire.Properties.Vector) return Vector is diff --git a/src/alire-requisites-platform.ads b/src/alire-requisites-platform.ads index 5fba051e..7bb4dd16 100644 --- a/src/alire-requisites-platform.ads +++ b/src/alire-requisites-platform.ads @@ -25,8 +25,9 @@ package Alire.Requisites.Platform with Preelaborate is use all type Compilers.Comparable; function Compiler is new Compilers.Factory; --- function Compiler_Is_Native return Tree is --- (Compiler < GNAT_GPL_2017 and Compiler /= GNAT_Unknown); + + function Compiler_Is_Native return Tree is + (Compiler < GNAT_GPL_2017 and Compiler /= GNAT_Unknown); package Distributions is new Comparables (Ps.Distributions, Ps."<", Ps.Distributions'Image,