diff --git a/cabal.project b/cabal.project index 2e7b69a..a1db2ee 100644 --- a/cabal.project +++ b/cabal.project @@ -2,15 +2,14 @@ packages: ./ghcup-gen/ghcup-gen.cabal package ghcup tests: False - flags: -tui +no-exe + flags: +tui +no-exe source-repository-package type: git - location: https://gitlab.haskell.org/haskell/ghcup-hs.git - tag: v0.1.17.8 + location: https://github.com/haskell/ghcup-hs.git + tag: v0.1.19.0 constraints: http-io-streams -brotli, - any.Cabal ==3.6.2.0, any.aeson >= 2.0.1.0 package libarchive @@ -25,5 +24,5 @@ package cabal-plan package aeson flags: +ordered-keymap -allow-newer: base, ghc-prim, template-haskell, language-c - +package streamly + flags: +use-unliftio diff --git a/ghcup-gen/Generate.hs b/ghcup-gen/Generate.hs index fd7a908..b582ede 100644 --- a/ghcup-gen/Generate.hs +++ b/ghcup-gen/Generate.hs @@ -40,7 +40,7 @@ import System.Exit import System.FilePath import System.IO import Text.Regex.Posix -import GHCup.Utils.String.QQ +import GHCup.Prelude.String.QQ import qualified Data.ByteString.Lazy as BSL import qualified Data.Map.Strict as M @@ -84,6 +84,7 @@ generateHLSGhc format output = do , DownloadFailed , UnknownArchive , ArchiveResult + , ContentLengthError ] $ do fp <- liftE $ downloadCached dli Nothing let subd = _dlSubdir dli diff --git a/ghcup-gen/Main.hs b/ghcup-gen/Main.hs index 3b22a43..1c834cd 100644 --- a/ghcup-gen/Main.hs +++ b/ghcup-gen/Main.hs @@ -11,7 +11,7 @@ import GHCup.Types import GHCup.Errors import GHCup.Platform import GHCup.Utils.Dirs -import GHCup.Utils.Logger +import GHCup.Prelude.Logger import GHCup.Types.JSON ( ) import Control.Exception ( displayException ) @@ -177,7 +177,7 @@ main = do , fancyColors = not no_color } dirs <- liftIO getAllDirs - let leanAppstate = LeanAppState (Settings True 0 False Never Curl True GHCupURL False GPGNone True) dirs defaultKeyBindings loggerConfig + let leanAppstate = LeanAppState (Settings True 0 Lax False Never Curl True GHCupURL False GPGNone True Nothing (DM mempty)) dirs defaultKeyBindings loggerConfig pfreq <- ( flip runReaderT leanAppstate . runE @'[NoCompatiblePlatform, NoCompatibleArch, DistroNotFound] $ platformRequest @@ -187,7 +187,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 True) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig + let appstate = AppState (Settings True 0 Lax False Never Curl True GHCupURL False GPGNone True Nothing (DM mempty)) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig let withValidateYamlOpts vopts f = case vopts of ValidateYAMLOpts { vInput = Nothing } -> diff --git a/ghcup-gen/Validate.hs b/ghcup-gen/Validate.hs index 2231597..ab61cb9 100644 --- a/ghcup-gen/Validate.hs +++ b/ghcup-gen/Validate.hs @@ -15,8 +15,8 @@ import GHCup.Errors import GHCup.Types import GHCup.Types.Optics import GHCup.Utils -import GHCup.Utils.Logger -import GHCup.Utils.Version.QQ +import GHCup.Prelude.Logger +import GHCup.Prelude.Version.QQ import Codec.Archive import Control.Applicative @@ -245,12 +245,13 @@ validateTarballs (TarballFilter etool versionRegex) = do , DownloadFailed , UnknownArchive , ArchiveResult + , ContentLengthError ] $ do case etool of Right (Just GHCup) -> do tmpUnpack <- lift mkGhcupTmpDir - _ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) tmpUnpack Nothing False + _ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) Nothing (fromGHCupPath tmpUnpack) Nothing False pure Nothing Right _ -> do p <- liftE $ downloadCached dli Nothing @@ -260,7 +261,7 @@ validateTarballs (TarballFilter etool versionRegex) = do $ p Left ShimGen -> do tmpUnpack <- lift mkGhcupTmpDir - _ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) tmpUnpack Nothing False + _ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) Nothing (fromGHCupPath tmpUnpack) Nothing False pure Nothing case r of VRight (Just basePath) -> do diff --git a/ghcup-gen/ghcup-gen.cabal b/ghcup-gen/ghcup-gen.cabal index 7f61509..cc5d9e5 100644 --- a/ghcup-gen/ghcup-gen.cabal +++ b/ghcup-gen/ghcup-gen.cabal @@ -47,14 +47,14 @@ executable ghcup-gen build-depends: , aeson-pretty ^>=0.8.9 , base >=4.13 && <5 - , bytestring ^>=0.10 + , bytestring ^>=0.11 , containers ^>=0.6 , deepseq ^>=1.4 , filepath ^>=1.4.2.1 - , ghcup ^>=0.1.17.3 + , ghcup ^>=0.1.19.0 , haskus-utils-variant ^>=3.2 , libarchive ^>=3.0.3.0 - , megaparsec ^>=9.0 + , megaparsec >=8.0.0 && <9.3 , mtl ^>=2.2 , optics ^>=0.4 , optparse-applicative >=0.15.1.0 && <0.17 @@ -63,7 +63,7 @@ executable ghcup-gen , regex-posix ^>=0.96 , resourcet ^>=1.2.2 , safe-exceptions ^>=0.1 - , text ^>=1.2.4.0 + , text ^>=2.0 , transformers ^>=0.5 , versions >=4.0.1 && <5.1 , yaml-streamly ^>=0.12.0