diff --git a/ghcup-gen/Generate.hs b/ghcup-gen/Generate.hs index 60e88ef..d86366a 100644 --- a/ghcup-gen/Generate.hs +++ b/ghcup-gen/Generate.hs @@ -18,6 +18,8 @@ import GHCup.Utils import Codec.Archive +import Control.DeepSeq +import Control.Exception ( evaluate ) import Control.Exception.Safe hiding ( handle ) import Control.Monad import Control.Monad.IO.Class @@ -82,12 +84,14 @@ generateHLSGhc format output = do , ArchiveResult ] $ do fp <- liftE $ downloadCached dli Nothing - files <- liftE $ getArchiveFiles fp - let regex = makeRegexOpts compExtended execBlank ([s|^haskell-language-server-([0-9]+\.)*([0-9]+)$|] :: ByteString) + filesL <- liftE $ getArchiveFiles fp + files <- liftIO $ evaluate $ force filesL + let regex = makeRegexOpts compExtended execBlank ([s|^haskell-language-server-([0-9]+\.)*([0-9]+)(\.exe)?$|] :: ByteString) let ghcs = rights $ MP.parse version' "" . T.pack . fromJust . stripPrefix "haskell-language-server-" + . stripExe <$> filter (match regex) files pure ghcs pure r @@ -98,7 +102,11 @@ generateHLSGhc format output = do StdOut -> liftIO $ BSL.putStr w FileOutput f -> liftIO $ BSL.writeFile f w pure ExitSuccess - + where + stripExe :: String -> String + stripExe f = case reverse f of + ('e':'x':'e':'.':r) -> reverse r + _ -> f generateTable :: ( MonadFail m , MonadMask m diff --git a/ghcup-gen/Main.hs b/ghcup-gen/Main.hs index f739ff8..d0d34af 100644 --- a/ghcup-gen/Main.hs +++ b/ghcup-gen/Main.hs @@ -170,7 +170,7 @@ main = do , fancyColors = not no_color } dirs <- liftIO getAllDirs - let leanAppstate = LeanAppState (Settings True 0 False Never Curl True GHCupURL False GPGNone False) dirs defaultKeyBindings loggerConfig + let leanAppstate = LeanAppState (Settings True 0 False Never Curl True GHCupURL False GPGNone True) dirs defaultKeyBindings loggerConfig pfreq <- ( flip runReaderT leanAppstate . runE @'[NoCompatiblePlatform, NoCompatibleArch, DistroNotFound] $ platformRequest @@ -180,7 +180,7 @@ main = do flip runReaderT leanAppstate $ logError $ T.pack $ prettyShow e liftIO $ exitWith (ExitFailure 2) - let appstate = AppState (Settings True 0 False Never Curl True GHCupURL False GPGNone False) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig + let appstate = AppState (Settings True 0 False Never Curl True GHCupURL False GPGNone True) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig let withValidateYamlOpts vopts f = case vopts of ValidateYAMLOpts { vInput = Nothing } -> diff --git a/ghcup-gen/ghcup-gen.cabal b/ghcup-gen/ghcup-gen.cabal index 9d625b3..7f61509 100644 --- a/ghcup-gen/ghcup-gen.cabal +++ b/ghcup-gen/ghcup-gen.cabal @@ -49,6 +49,7 @@ executable ghcup-gen , base >=4.13 && <5 , bytestring ^>=0.10 , containers ^>=0.6 + , deepseq ^>=1.4 , filepath ^>=1.4.2.1 , ghcup ^>=0.1.17.3 , haskus-utils-variant ^>=3.2 diff --git a/hls-metadata-0.0.1.json b/hls-metadata-0.0.1.json index 7e23594..03da9c7 100644 --- a/hls-metadata-0.0.1.json +++ b/hls-metadata-0.0.1.json @@ -31,7 +31,14 @@ "8.8.3", "8.8.4" ], - "Windows": [] + "Windows": [ + "8.6.4", + "8.6.5", + "8.8.4", + "8.10.2", + "8.10.3", + "8.10.4" + ] } }, "1.2.0": { @@ -69,7 +76,15 @@ "8.8.3", "8.8.4" ], - "Windows": [] + "Windows": [ + "8.10.2", + "8.10.3", + "8.10.4", + "8.10.5", + "8.6.4", + "8.6.5", + "8.8.4" + ] } }, "1.3.0": { @@ -107,7 +122,16 @@ "8.8.4", "9.0.1" ], - "Windows": [] + "Windows": [ + "8.10.2", + "8.10.3", + "8.10.4", + "8.10.5", + "8.6.4", + "8.6.5", + "8.8.4", + "9.0.1" + ] } }, "1.4.0": { @@ -154,7 +178,18 @@ "8.8.4", "9.0.1" ], - "Windows": [] + "Windows": [ + "8.10.2", + "8.10.3", + "8.10.4", + "8.10.5", + "8.10.6", + "8.10.7", + "8.6.4", + "8.6.5", + "8.8.4", + "9.0.1" + ] }, "A_ARM": { "Linux_UnknownLinux": [ @@ -207,7 +242,14 @@ "8.8.4", "9.0.1" ], - "Windows": [] + "Windows": [ + "8.10.5", + "8.10.6", + "8.10.7", + "8.6.5", + "8.8.4", + "9.0.1" + ] }, "A_ARM": { "Linux_UnknownLinux": [ @@ -257,7 +299,14 @@ "8.8.4", "9.0.1" ], - "Windows": [] + "Windows": [ + "8.10.5", + "8.10.6", + "8.10.7", + "8.6.5", + "8.8.4", + "9.0.1" + ] }, "A_ARM": { "Linux_UnknownLinux": [ @@ -307,7 +356,15 @@ "9.0.2", "9.2.1" ], - "Windows": [] + "Windows": [ + "8.10.6", + "8.10.7", + "8.6.5", + "8.8.4", + "9.0.1", + "9.0.2", + "9.2.1" + ] }, "A_ARM": { "Linux_UnknownLinux": [ @@ -354,7 +411,15 @@ "9.0.2", "9.2.1" ], - "Windows": [] + "Windows": [ + "8.10.6", + "8.10.7", + "8.6.5", + "8.8.4", + "9.0.1", + "9.0.2", + "9.2.1" + ] }, "A_ARM": { "Linux_UnknownLinux": [ diff --git a/hls-metadata-0.0.1.json.sig b/hls-metadata-0.0.1.json.sig index c1467db..ea5de2a 100644 Binary files a/hls-metadata-0.0.1.json.sig and b/hls-metadata-0.0.1.json.sig differ