From d2c5d4dfd941e66a2d0d518c8b2229a9c0a56cdd Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 11 Aug 2020 20:21:45 +0200 Subject: [PATCH] Test that we're not missing GHCup alpine --- app/ghcup-gen/Validate.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/ghcup-gen/Validate.hs b/app/ghcup-gen/Validate.hs index cec2130..9c4b7d0 100644 --- a/app/ghcup-gen/Validate.hs +++ b/app/ghcup-gen/Validate.hs @@ -9,6 +9,7 @@ import GHCup.Download import GHCup.Types import GHCup.Utils.Dirs import GHCup.Utils.Logger +import GHCup.Utils.Version.QQ import Control.Exception.Safe import Control.Monad @@ -89,6 +90,15 @@ validate dls = do when ((not $ any (== FreeBSD) pspecs) && arch == A_64) $ lift $ $(logWarn) [i|FreeBSD missing for #{t} #{v'} #{arch}|] + -- alpine needs to be set explicitly, because + -- we cannot assume that "Linux UnknownLinux" runs on Alpine + -- (although it could be static) + when (not $ any (== Linux Alpine) pspecs) $ + case t of + GHCup -> (lift $ $(logError) [i|Linux Alpine missing for #{t} #{v'} #{arch}|]) >> addError + Cabal | v > [vver|2.4.1.0|] -> (lift $ $(logError) [i|Linux Alpine missing for #{t} #{v'} #{arch}|]) >> addError + _ -> lift $ $(logWarn) [i|Linux Alpine missing for #{t} #{v'} #{arch}|] + checkUniqueTags tool = do let allTags = join $ M.elems $ availableToolVersions dls tool let nonUnique =