ghcup 0.2.2.0 → 0.2.3.0
raw patch · 10 files changed
+40/−11 lines, 10 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- GHCup.Command.Install: installBindist :: (MonadReader env m, HasPlatformReq env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> Maybe ToolDescription -> DownloadInfo -> TargetVersionRev -> InstallDir -> Bool -> [String] -> Maybe [String] -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, URIParseError, NoInstallInfo, MergeFileTreeError, ProcessError, ParseError, DirNotEmpty, UninstallFailed, MalformedInstallInfo] m (InstallationSpecResolved, FilePath)
+ GHCup.Command.Install: installBindist :: (MonadReader env m, HasPlatformReq env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> Maybe ToolDescription -> DownloadInfo -> TargetVersionRev -> InstallDir -> Bool -> [String] -> Maybe [String] -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, URIParseError, NoInstallInfo, MergeFileTreeError, ProcessError, ParseError, DirNotEmpty, UninstallFailed, MalformedInstallInfo, InvalidBuildConfig] m (InstallationSpecResolved, FilePath)
- GHCup.Command.Install: installPackedBindist :: (MonadReader env m, HasDirs env, HasPlatformReq env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> Maybe ToolDescription -> FilePath -> DownloadInfo -> InstallDirResolved -> TargetVersionRev -> Bool -> [String] -> Maybe [String] -> Excepts '[CopyError, FileAlreadyExistsError, MergeFileTreeError, ProcessError, ParseError, UnknownArchive, TarDirDoesNotExist, DirNotEmpty, ArchiveResult, NoInstallInfo, MalformedInstallInfo] m InstallationSpecResolved
+ GHCup.Command.Install: installPackedBindist :: (MonadReader env m, HasDirs env, HasPlatformReq env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> Maybe ToolDescription -> FilePath -> DownloadInfo -> InstallDirResolved -> TargetVersionRev -> Bool -> [String] -> Maybe [String] -> Excepts '[CopyError, FileAlreadyExistsError, MergeFileTreeError, ProcessError, ParseError, UnknownArchive, TarDirDoesNotExist, DirNotEmpty, ArchiveResult, NoInstallInfo, MalformedInstallInfo, InvalidBuildConfig] m InstallationSpecResolved
- GHCup.Command.Install: installTool :: (MonadReader env m, HasPlatformReq env, HasGHCupInfo env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> TargetVersionReq -> InstallDir -> Bool -> [String] -> Maybe [String] -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, URIParseError, NoInstallInfo, MergeFileTreeError, ProcessError, ParseError, DirNotEmpty, UninstallFailed, MalformedInstallInfo] m (InstallationSpecResolved, FilePath)
+ GHCup.Command.Install: installTool :: (MonadReader env m, HasPlatformReq env, HasGHCupInfo env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIOish m) => Tool -> TargetVersionReq -> InstallDir -> Bool -> [String] -> Maybe [String] -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, URIParseError, NoInstallInfo, MergeFileTreeError, ProcessError, ParseError, DirNotEmpty, UninstallFailed, MalformedInstallInfo, InvalidBuildConfig] m (InstallationSpecResolved, FilePath)
- GHCup.Command.Install: installUnpackedBindist :: forall m env. (HasLog env, HasDirs env, HasSettings env, HasPlatformReq env, MonadReader env m, MonadIOish m) => Tool -> Maybe ToolDescription -> FilePath -> InstallDirResolved -> GHCupPath -> DownloadInfo -> TargetVersionRev -> Bool -> [String] -> Maybe [String] -> Excepts '[CopyError, FileAlreadyExistsError, MergeFileTreeError, ProcessError, ParseError, NoInstallInfo, MalformedInstallInfo] m InstallationSpecResolved
+ GHCup.Command.Install: installUnpackedBindist :: forall m env. (HasLog env, HasDirs env, HasSettings env, HasPlatformReq env, MonadReader env m, MonadIOish m) => Tool -> Maybe ToolDescription -> FilePath -> InstallDirResolved -> GHCupPath -> DownloadInfo -> TargetVersionRev -> Bool -> [String] -> Maybe [String] -> Excepts '[CopyError, FileAlreadyExistsError, MergeFileTreeError, ProcessError, ParseError, NoInstallInfo, MalformedInstallInfo, InvalidBuildConfig] m InstallationSpecResolved
- GHCup.Command.Install.LowLevel: installTheSpec :: (HasLog env, HasDirs env, HasSettings env, MonadReader env m, MonadIOish m) => InstallationSpecInput -> FilePath -> InstallDirResolved -> GHCupPath -> [String] -> Maybe [String] -> Bool -> Excepts '[CopyError, MergeFileTreeError, ProcessError, ParseError, MalformedInstallInfo] m ()
+ GHCup.Command.Install.LowLevel: installTheSpec :: (HasLog env, HasDirs env, HasSettings env, MonadReader env m, MonadIOish m) => InstallationSpecInput -> FilePath -> InstallDirResolved -> GHCupPath -> [String] -> Maybe [String] -> Bool -> Excepts '[CopyError, MergeFileTreeError, ProcessError, ParseError, MalformedInstallInfo, InvalidBuildConfig] m ()
- GHCup.Types.Optics: isConfigure :: forall a_i1WRV. Lens' (InstallationSpecGen a_i1WRV) (Maybe ConfigSpec)
+ GHCup.Types.Optics: isConfigure :: forall a_i1WWG. Lens' (InstallationSpecGen a_i1WWG) (Maybe ConfigSpec)
- GHCup.Types.Optics: isDataRules :: forall a_i1WRV. Lens' (InstallationSpecGen a_i1WRV) [InstallFileRule]
+ GHCup.Types.Optics: isDataRules :: forall a_i1WWG. Lens' (InstallationSpecGen a_i1WWG) [InstallFileRule]
- GHCup.Types.Optics: isExeRules :: forall a_i1WRV. Lens' (InstallationSpecGen a_i1WRV) [InstallFileRule]
+ GHCup.Types.Optics: isExeRules :: forall a_i1WWG. Lens' (InstallationSpecGen a_i1WWG) [InstallFileRule]
- GHCup.Types.Optics: isExeSymLinked :: forall a_a1WRX a_i1WRV. Lens (InstallationSpecGen a_i1WRV) (InstallationSpecGen a_a1WRX) [a_i1WRV] [a_a1WRX]
+ GHCup.Types.Optics: isExeSymLinked :: forall a_a1WWI a_i1WWG. Lens (InstallationSpecGen a_i1WWG) (InstallationSpecGen a_a1WWI) [a_i1WWG] [a_a1WWI]
- GHCup.Types.Optics: isMake :: forall a_i1WRV. Lens' (InstallationSpecGen a_i1WRV) (Maybe MakeSpec)
+ GHCup.Types.Optics: isMake :: forall a_i1WWG. Lens' (InstallationSpecGen a_i1WWG) (Maybe MakeSpec)
- GHCup.Types.Optics: isPreserveMtimes :: forall a_i1WRV. Lens' (InstallationSpecGen a_i1WRV) Bool
+ GHCup.Types.Optics: isPreserveMtimes :: forall a_i1WWG. Lens' (InstallationSpecGen a_i1WWG) Bool
Files
- CHANGELOG.md +4/−0
- ghcup.cabal +1/−1
- lib-opt/GHCup/OptParse/Install.hs +1/−0
- lib-opt/GHCup/OptParse/Run.hs +2/−0
- lib-tui/GHCup/Brick/Actions.hs +1/−0
- lib/GHCup/Command/Compile/HLS.hs +2/−1
- lib/GHCup/Command/Install.hs +4/−0
- lib/GHCup/Command/Install/LowLevel.hs +20/−4
- lib/GHCup/Types.hs +4/−4
- scripts/bootstrap/bootstrap-haskell +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Version history for ghcup +## 0.2.3.0 -- 2026-05-22++* [fix bug](https://github.com/haskell/ghcup-hs/pull/1338) when passing `--install-targets` causes failure+ ## 0.2.2.0 -- 2026-05-21 * fix minor bug in "new tool available" update check
ghcup.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: ghcup-version: 0.2.2.0+version: 0.2.3.0 license: LGPL-3.0-only license-file: LICENSE copyright: Julian Ospald 2024
lib-opt/GHCup/OptParse/Install.hs view
@@ -335,6 +335,7 @@ , NoInstallInfo , GHCup.Errors.ParseError , MalformedInstallInfo+ , InvalidBuildConfig ]
lib-opt/GHCup/OptParse/Run.hs view
@@ -215,6 +215,7 @@ , ParseError , IncompatibleConfig , MalformedInstallInfo+ , InvalidBuildConfig ] @@ -368,6 +369,7 @@ , ParseError , FileDoesNotExistError , MalformedInstallInfo+ , InvalidBuildConfig ] (ResourceT (ReaderT AppState m)) () installToolChainFull Toolchain{..} tmp = do case ghcVer of
lib-tui/GHCup/Brick/Actions.hs view
@@ -267,6 +267,7 @@ , URIParseError , NoInstallInfo , MalformedInstallInfo+ , InvalidBuildConfig ] withNoVerify :: (MonadReader AppState m) => m a -> m a
lib/GHCup/Command/Compile/HLS.hs view
@@ -264,7 +264,7 @@ liftE $ runBuildAction tmpUnpack- (reThrowAll @_ @'[GPGError, DownloadFailed, DigestError, ContentLengthError, PatchFailed, ProcessError, FileAlreadyExistsError, CopyError, ParseError , MergeFileTreeError , MalformedInstallInfo, FileDoesNotExistError, NoInstallInfo] @'[BuildFailed] (BuildFailed $ fromGHCupPath workdir) $ do+ (reThrowAll @_ @'[GPGError, DownloadFailed, DigestError, ContentLengthError, PatchFailed, ProcessError, FileAlreadyExistsError, CopyError, ParseError , MergeFileTreeError , MalformedInstallInfo, FileDoesNotExistError, NoInstallInfo, InvalidBuildConfig] @'[BuildFailed] (BuildFailed $ fromGHCupPath workdir) $ do let tmpInstallDir = fromGHCupPath workdir </> "out" liftIO $ createDirRecursive' tmpInstallDir @@ -402,6 +402,7 @@ , MalformedInstallInfo , NoInstallInfo , ProcessError+ , InvalidBuildConfig ] m () addAdHocBinaries mMetadata toolDesc workdir installDest tmpInstallDest VersionRev{..} forceInstall = do let tver = mkTVer _vrVersion
lib/GHCup/Command/Install.hs view
@@ -87,6 +87,7 @@ , DirNotEmpty , UninstallFailed , MalformedInstallInfo+ , InvalidBuildConfig ] m (InstallationSpecResolved, FilePath)@@ -143,6 +144,7 @@ , DirNotEmpty , UninstallFailed , MalformedInstallInfo+ , InvalidBuildConfig ] m (InstallationSpecResolved, FilePath)@@ -214,6 +216,7 @@ , ArchiveResult , NoInstallInfo , MalformedInstallInfo+ , InvalidBuildConfig ] m InstallationSpecResolved installPackedBindist tool toolDesc dl dlInfo inst trev forceInstall extraArgs installTargets = do PlatformRequest {..} <- lift getPlatformReq@@ -261,6 +264,7 @@ , ParseError , NoInstallInfo , MalformedInstallInfo+ , InvalidBuildConfig ] m InstallationSpecResolved installUnpackedBindist tool toolDesc workdir installDest tmpInstallDest dlInfo trev@(TargetVersionRev tver _rev) forceInstall extraArgs installTargets = do instSpec <- liftE $ installationSpecFromMetadata' dlInfo tool tver
lib/GHCup/Command/Install/LowLevel.hs view
@@ -98,6 +98,7 @@ , ProcessError , ParseError , MalformedInstallInfo+ , InvalidBuildConfig ] m () installTheSpec InstallationSpec{..} workdir installDest tmpInstallDest extraArgs installTargets forceInstall = do -- run configure first@@ -106,8 +107,10 @@ addConfArgs <- lift $ sanitizefConfOptions extraArgs let configFile = fromMaybe "configure" _csConfigFile- processedConfArgs <- forM _csConfigArgs $ \a -> either (throwE . ParseError . show) pure . parseDomain $ a- newEnv <- forM _csConfigEnv $ \EnvSpec{..} -> liftIO (augmentEnvironment _esEnv _esUnion)+ processedConfArgs <- forM _csConfigArgs $ \a -> throwOnParseError . parseDomain $ a+ newEnv <- forM _csConfigEnv $ \EnvSpec{..} -> do+ processedEnv <- throwOnParseError $ forM _esEnv (\(var, val) -> (var,) <$> parseDomain val)+ liftIO (augmentEnvironment processedEnv _esUnion) liftE $ execWithWrapper "sh" (("." Posix.</> configFile) : processedConfArgs <> addConfArgs )@@ -119,8 +122,19 @@ -- then make case _isMake of Just MakeSpec{..} -> do- processedMakeArgs <- either (throwE . ParseError . show) pure $ forM (fromMaybe _msMakeArgs installTargets) parseDomain- newEnv <- forM _msMakeEnv $ \EnvSpec{..} -> liftIO (augmentEnvironment _esEnv _esUnion)+ processedMakeArgs <- case installTargets of+ Just it -> do+ -- we need to check whether applying 'installTargets' would wipe out PREFIX/DESTDIR+ origArgs <- throwOnParseError $ forM _msMakeArgs parseDomain+ if origArgs /= _msMakeArgs+ then throwE $ InvalidBuildConfig $ "Can't overwrite install targets " <> T.pack (show _msMakeArgs) <> " since they contain domain variables."+ else throwOnParseError $ forM it parseDomain+ Nothing ->+ throwOnParseError $ forM _msMakeArgs parseDomain++ newEnv <- forM _msMakeEnv $ \EnvSpec{..} -> do+ processedEnv <- throwOnParseError $ forM _esEnv (\(var, val) -> (var,) <$> parseDomain val)+ liftIO (augmentEnvironment processedEnv _esUnion) liftE $ makeWithWrapper processedMakeArgs (Just workdir) "make" newEnv _ -> pure () @@ -153,6 +167,8 @@ pure into parseDomain = MP.parse domainParser ""++ throwOnParseError = either (throwE . ParseError . show) pure domainParser :: MP.Parsec Void String String domainParser = concat <$> many anyOrKnownVars
lib/GHCup/Types.hs view
@@ -509,8 +509,8 @@ , _csConfigFile = Just "configure" } , _isMake = Just MakeSpec {- _msMakeArgs = ["DESTDIR=${TMPDIR}", "install"]- , _msMakeEnv = Nothing+ _msMakeArgs = ["install"]+ , _msMakeEnv = Just $ EnvSpec [("DESTDIR", "${TMPDIR}")] PreferSpec } , _isPreserveMtimes = True , _isExeSymLinked = defaultGHCExeSymLinked pfreq tver (ghcBinaries pfreq tver)@@ -546,8 +546,8 @@ , _isDataRules = [] , _isConfigure = Nothing , _isMake = Just MakeSpec {- _msMakeArgs = ["DESTDIR=${TMPDIR}", "PREFIX=${PREFIX}", "install"]- , _msMakeEnv = Nothing+ _msMakeArgs = ["install"]+ , _msMakeEnv = Just $ EnvSpec [("DESTDIR", "${TMPDIR}"), ("PREFIX", "${PREFIX}")] PreferSpec } , _isPreserveMtimes = False , _isExeSymLinked = [] -- we can't figure it out
scripts/bootstrap/bootstrap-haskell view
@@ -41,7 +41,7 @@ plat="$(uname -s)" arch=$(uname -m)-ghver="0.2.2.0"+ghver="0.2.3.0" : "${GHCUP_BASE_URL:=https://downloads.haskell.org/~ghcup}" export GHCUP_SKIP_UPDATE_CHECK=yes