packages feed

ghcup 0.1.17.9 → 0.1.17.10

raw patch · 5 files changed

+31/−18 lines, 5 filesdep ~CabalPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Cabal

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,11 +1,21 @@ # Revision history for ghcup -## 0.1.17.8 -- XXXX-XX-XX+## 0.1.17.10 -- 2022-05-12 +* windows hotfix (hackage-only release)++## 0.1.17.9 -- 2022-05-12++* broken sdist (hackage-only release)++## 0.1.17.8 -- 2022-05-11++* Fix a serious (but hard to trigger) bug when combining `--isolate <DIR>` with `--force`, please make sure to upgrade or avoid `--force` * Fix HLS build not cleaning up properly on failed installations, fixes [#361](https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/361)-    - this also fixes a significant bug on installation failure when combining `--isolate DIR` with `--force` * Fix parsing of symlinks with multiple slashes, wrt [#353](https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/353)-* Re-enable upgrade functionality for all configurations wrt [#250](https://gitlab.haskell.org/haskell/ghcup-hs/-/merge_requests/250)+* Re-enable upgrade functionality for all configurations wrt [MR #250](https://gitlab.haskell.org/haskell/ghcup-hs/-/merge_requests/250) and [VSCode haskell issue #601](https://github.com/haskell/vscode-haskell/issues/601)+* Fix `ghcup run --ghc 8.10` (for short versions) wrt [#360](https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/360)+    - this also introduces a `--quick` switch for `ghcup run`  ## 0.1.17.7 -- 2022-04-21 
app/ghcup/GHCup/OptParse/Compile.hs view
@@ -99,7 +99,7 @@     --[ Parsers ]--     --------------- -          + compileP :: Parser CompileCommand compileP = subparser   (  command@@ -541,11 +541,11 @@                 pure ExitSuccess               VLeft (V (AlreadyInstalled _ v)) -> do                 runLogger $ logWarn $-                  "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'"+                  "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall"                 pure ExitSuccess               VLeft (V (DirNotEmpty fp)) -> do-                runLogger $ logWarn $-                  "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless."+                runLogger $ logError $+                  "Install directory " <> T.pack fp <> " is not empty."                 pure $ ExitFailure 3               VLeft err@(V (BuildFailed tmpdir _)) -> do                 case keepDirs settings of
app/ghcup/GHCup/OptParse/Install.hs view
@@ -210,7 +210,7 @@            )           )     <*> switch-          (short 'f' <> long "force" <> help "Force install")+          (short 'f' <> long "force" <> help "Force install (THIS IS UNSAFE, only use it in Dockerfiles or CI)")  where   setDefault = case tool of     Nothing  -> False@@ -421,20 +421,20 @@                VLeft (V (AlreadyInstalled _ v, ())) -> do                 runLogger $ logWarn $-                  "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'"+                  "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall"                 pure ExitSuccess               VLeft (V (AlreadyInstalled _ v)) -> do                 runLogger $ logWarn $-                  "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'"+                  "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall"                 pure ExitSuccess                VLeft (V (DirNotEmpty fp)) -> do-                runLogger $ logWarn $-                  "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless."+                runLogger $ logError $+                  "Install directory " <> T.pack fp <> " is not empty."                 pure $ ExitFailure 3               VLeft (V (DirNotEmpty fp, ())) -> do-                runLogger $ logWarn $-                  "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless."+                runLogger $ logError $+                  "Install directory " <> T.pack fp <> " is not empty."                 pure $ ExitFailure 3                VLeft err@(V (BuildFailed tmpdir _)) -> do
ghcup.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               ghcup-version:            0.1.17.9+version:            0.1.17.10 license:            LGPL-3.0-only license-file:       LICENSE copyright:          Julian Ospald 2020
lib/GHCup.hs view
@@ -324,13 +324,16 @@                    -> InstallDirResolved  -- ^ Path to install to                    -> Version             -- ^ The GHC version                    -> Excepts '[ProcessError] m ()-installUnpackedGHC path (fromInstallDir -> inst) ver+installUnpackedGHC path inst ver   | isWindows = do       lift $ logInfo "Installing GHC (this may take a while)"       -- Windows bindists are relocatable and don't need       -- to run configure.       -- We also must make sure to preserve mtime to not confuse ghc-pkg.-      lift $ withRunInIO $ \run -> flip onException (run $ recyclePathForcibly inst) $ copyDirectoryRecursive path inst $ \source dest -> do+      lift $ withRunInIO $ \run -> flip onException (case inst of+                                                      IsolateDirResolved _ -> pure ()+                                                      GHCupDir d -> run $ recyclePathForcibly d+                                                    ) $ copyDirectoryRecursive path (fromInstallDir inst) $ \source dest -> do         mtime <- getModificationTime source         moveFilePortable source dest         setModificationTime dest mtime@@ -345,7 +348,7 @@        lift $ logInfo "Installing GHC (this may take a while)"       lEM $ execLogged "sh"-                       ("./configure" : ("--prefix=" <> inst)+                       ("./configure" : ("--prefix=" <> fromInstallDir inst)                         : alpineArgs                        )                        (Just path)