From 9faa4cce39b5baf219c1e01abfa8af99761dc9e3 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 16 Sep 2023 23:15:30 +0100 Subject: [PATCH 01/25] Complete release preparation step D --- doc/build_command.md | 2 +- doc/global_flags.md | 2 +- doc/setup_command.md | 17 +++++++++++------ doc/upgrade_command.md | 2 +- doc/yaml_configuration.md | 6 +++--- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/doc/build_command.md b/doc/build_command.md index 358e5603db..15c5a76604 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -585,7 +585,7 @@ This can be useful with `stack build --dry-run`. ### `--progress-bar` option -:octicons-tag-24: UNRELEASED +[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1) Default: `capped` diff --git a/doc/global_flags.md b/doc/global_flags.md index f26ae3ff78..671e2f0aca 100644 --- a/doc/global_flags.md +++ b/doc/global_flags.md @@ -162,7 +162,7 @@ to standard output (e.g. `2.9.1`) and quit. ## `--[no-]plan-in-log` flag -:octicons-tag-24: UNRELEASED +[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1) Default: Disabled diff --git a/doc/setup_command.md b/doc/setup_command.md index d1ab28f47e..b8d481171c 100644 --- a/doc/setup_command.md +++ b/doc/setup_command.md @@ -43,25 +43,30 @@ command are inconsistent and take no action. required on Linux, Stack will refer to the presence or absence of certain libraries or the versions of those libraries. - For example, Stack 2.11.1 considers: + For example, Stack 2.13.1 considers: - * the version of `libc6`, the + * If `libc.musl-x86_64.so.1` is present. This file is provided by the + [musl libc](https://musl.libc.org/). + + * The version of `libc6` (if musl libc is not applicable), the [GNU C Library](https://www.gnu.org/software/libc/) (glibc), that is present. The GNU C Library is designed to be backwards compatible. - * if `libgmp.so.3` or `libgmp.so.10` is present. These files are provided + * If `libgmp.so.3` or `libgmp.so.10` is present. These files are provided by different versions of the [GNU Multiple Precision Arithmetic Library](https://gmplib.org/). - * if `libncursesw.so.6` is present. This file is provided by a shared + * If `libncursesw.so.6` is present. This file is provided by a shared library for terminal handling with wide character support. - * if `libtinfo.so.5` or `libtinfo.so.6` is present. These files are + * If `libtinfo.so.5` or `libtinfo.so.6` is present. These files are provided by different versions of a shared low-level terminfo library for terminal handling. - Stack 2.11.1 uses `ghc-build`: + Stack 2.13.1 uses `ghc-build`: + * `musl` to indicate `libc.musl-x86_64.so.1` is present and Stack should use + the GHC binary distribution for Alpine Linux. * `tinfo6` to indicate `libgmp.so.10` and `libtinfo.so.6` are present and `libc6` is compatible with `libc6` 2.32. * `tinfo6-libc6-pre232` to indicate `libgmp.so.10` and `libtinfo.so.6` are diff --git a/doc/upgrade_command.md b/doc/upgrade_command.md index 3d8927c970..1dd1e52349 100644 --- a/doc/upgrade_command.md +++ b/doc/upgrade_command.md @@ -79,7 +79,7 @@ When compiling from source code, by default: `my-stack upgrade --no-only-local-bin` seeks also to upgrade `my-stack` to the latest version of Stack available. -* `stack upgrade --binary-version 2.11.1` seeks an upgrade to Stack 2.11.1 if +* `stack upgrade --binary-version 2.13.1` seeks an upgrade to Stack 2.13.1 if available as a binary distribution for the platform, even if not newer. * `stack upgrade --source-only` seeks an upgrade by building Stack with diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 9085403128..a3d1e5fd24 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -463,7 +463,7 @@ build: # Since 1.8. Starting with 2.0, the default is true interleaved-output: true - # Since UNRELEASED. Available options are none, count-only, capped and full. + # Since 2.13.1. Available options are none, count-only, capped and full. progress-bar: capped # Since 1.10. ddump-dir: "" @@ -480,7 +480,7 @@ of the same name. For further information, see the ### casa -:octicons-tag-24: UNRELEASED +[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1) Default: @@ -1366,7 +1366,7 @@ setup-info: 'Platforms' are pairs of an operating system and a machine architecture (for example, 32-bit i386 or 64-bit x86-64) (represented by the -`Cabal.Distribution.Systems.Platform` type). Stack currently (version 2.11.1) +`Cabal.Distribution.Systems.Platform` type). Stack currently (version 2.13.1) supports the following pairs in the format of the `setup-info` key: |Operating system|I386 arch|X86_64 arch|Other machine architectures | From 14aae39fb3145123310406a8e066e86b81f2aa6c Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 16 Sep 2023 23:22:48 +0100 Subject: [PATCH 02/25] Complete release preparation step E --- ChangeLog.md | 4 +--- cabal.config | 2 +- package.yaml | 2 +- stack.cabal | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 06b9ad5e69..82ef93874f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased changes +## v2.13.0.1 (release candidate) - 2023-09-16 Release notes: @@ -10,8 +10,6 @@ Release notes: **Changes since v2.11.1:** -Major changes: - Behavior changes: * Build artefacts are placed in `.stack-work/dist//` diff --git a/cabal.config b/cabal.config index a6ae063783..ab93c6cc24 100644 --- a/cabal.config +++ b/cabal.config @@ -163,7 +163,7 @@ constraints: , socks ==0.6.1 , split ==0.2.3.5 , splitmix ==0.1.0.4 - , stack ==2.12.0 + , stack ==2.13.0.1 , static-bytes ==0.1.0 , stm ==2.5.1.0 , stm-chans ==3.0.0.9 diff --git a/package.yaml b/package.yaml index d150d1cccb..3b6fcec8ad 100644 --- a/package.yaml +++ b/package.yaml @@ -2,7 +2,7 @@ spec-version: 0.35.0 name: stack -version: '2.13.0' +version: '2.13.0.1' synopsis: The Haskell Tool Stack description: | Please see the documentation at diff --git a/stack.cabal b/stack.cabal index baf43f1ddd..f36ab8b5ba 100644 --- a/stack.cabal +++ b/stack.cabal @@ -5,7 +5,7 @@ cabal-version: 2.0 -- see: https://github.com/sol/hpack name: stack -version: 2.13.0 +version: 2.13.0.1 synopsis: The Haskell Tool Stack description: Please see the documentation at for usage information. From 868b072215955df976cf642292d18a5cb6986be0 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 17 Sep 2023 08:27:04 +0100 Subject: [PATCH 03/25] Complete release process step E --- ChangeLog.md | 14 ++++++++++++++ package.yaml | 2 +- stack.cabal | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 82ef93874f..7b5204f099 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,19 @@ # Changelog +## Unreleased changes + +Release notes: + +**Changes since v2.13.0.1:** + +Major changes: + +Behavior changes: + +Other enhancements: + +Bug fixes: + ## v2.13.0.1 (release candidate) - 2023-09-16 Release notes: diff --git a/package.yaml b/package.yaml index 3b6fcec8ad..0bc5a5aa21 100644 --- a/package.yaml +++ b/package.yaml @@ -2,7 +2,7 @@ spec-version: 0.35.0 name: stack -version: '2.13.0.1' +version: '2.13.0.2' synopsis: The Haskell Tool Stack description: | Please see the documentation at diff --git a/stack.cabal b/stack.cabal index f36ab8b5ba..ae627c1e28 100644 --- a/stack.cabal +++ b/stack.cabal @@ -5,7 +5,7 @@ cabal-version: 2.0 -- see: https://github.com/sol/hpack name: stack -version: 2.13.0.1 +version: 2.13.0.2 synopsis: The Haskell Tool Stack description: Please see the documentation at for usage information. From 11406e50abdad935e1b463a7f3d8e9ef18daeeee Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 17 Sep 2023 19:06:37 +0100 Subject: [PATCH 04/25] Fix message suffix `due to warnings` with `dump-logs: warning` --- ChangeLog.md | 3 +++ src/Stack/Build/Execute.hs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 7b5204f099..36e666b4d2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,6 +14,9 @@ Other enhancements: Bug fixes: +* Restore message suffix `due to warnings` with `dump-logs: warning` (broken + with Stack 2.11.1). + ## v2.13.0.1 (release candidate) - 2023-09-16 Release notes: diff --git a/src/Stack/Build/Execute.hs b/src/Stack/Build/Execute.hs index 7d39421369..3afae48537 100644 --- a/src/Stack/Build/Execute.hs +++ b/src/Stack/Build/Execute.hs @@ -578,7 +578,7 @@ withExecuteEnv bopts boptsCli baseConfigOpts locals globalPackages snapshotPacka fillSep ( ( fillSep ( flow "Dumping log file" - : [ flow msgSuffix | L.null msgSuffix ] + : [ flow msgSuffix | not (L.null msgSuffix) ] ) <> ":" ) From c375c6850cc7b0b4e5e9a3bae4c56b66db360216 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 17 Sep 2023 20:32:35 +0100 Subject: [PATCH 05/25] Re #5566 Further improve online documentation for dump-logs --- doc/build_command.md | 14 ++++++++------ doc/yaml_configuration.md | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/build_command.md b/doc/build_command.md index c4fb90d0b7..71b6d44b6c 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -559,14 +559,16 @@ package is targetted in a multi-package project (for example, using * **More than one target package:** The build output from GHC (as opposed to from Stack) for each target package is sent to a log file for that package, - unless an error occurs that prevents that. At the end of the build, the - location of the directory containing the log files is reported. To also output - the contents of the log files to the standard error output stream of the - console at the end of the build, use Stack's `dump-logs` option. For further + unless an error occurs that prevents that. If color in output is in use, there + will be two files, one with extension `.log` without color codes and one with + extension `.log-color` with color codes. At the end of the build, the location + of the directory containing the log files is reported. To also output the + contents of the log files to the standard error output stream of the console + at the end of the build, use Stack's `dump-logs` option. For further information about that option, see the [YAML configuration](yaml_configuration.md#dump-logs) documentation. The - default `dump-logs` mode is to output the contents of the log files that are - warnings. + default `dump-logs` mode is to output the contents of any log files that + include GHC warnings. ### `--[no]-open` flag diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index de133e25a0..afeecd7d81 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -696,9 +696,9 @@ The value of the `dump-logs` key controls what, if any, log file content is sent build. Possible values are: ~~~yaml -dump-logs: none # don't dump the content of any log files -dump-logs: warning # dump the content of log files that are warnings -dump-logs: all # dump all of the content of log files +dump-logs: none # don't dump the content of any log files +dump-logs: warning # dump the content of any log files that include GHC warnings +dump-logs: all # dump the content of all log files ~~~ At the command line, `--no-dump-logs` is equivalent to `dump-logs: none` and From acfc2c87a752f9c278f5f107899e0e341e1ac83a Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 18 Sep 2023 23:59:33 +0100 Subject: [PATCH 06/25] Fix #6249 Do not warn, if build-tool is package executable --- src/Stack/Build/ConstructPlan.hs | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/Stack/Build/ConstructPlan.hs b/src/Stack/Build/ConstructPlan.hs index b1280d20c2..350ae3b2df 100644 --- a/src/Stack/Build/ConstructPlan.hs +++ b/src/Stack/Build/ConstructPlan.hs @@ -10,6 +10,7 @@ module Stack.Build.ConstructPlan import Control.Monad.RWS.Strict ( RWST, get, modify, modify', pass, put, runRWST, tell ) +import Control.Monad.Trans.Maybe ( MaybeT (..) ) import qualified Data.List as L import qualified Data.Map.Merge.Strict as Map import qualified Data.Map.Strict as Map @@ -1206,18 +1207,28 @@ psLocation PSRemote{} = Snap -- tool dependencies. checkAndWarnForUnknownTools :: Package -> M () checkAndWarnForUnknownTools p = do - -- Check whether the tool is on the PATH before warning about it. - warnings <- fmap catMaybes $ forM (Set.toList $ packageUnknownTools p) $ - \name@(ExeName toolName) -> do - let settings = minimalEnvSettings { esIncludeLocals = True } - config <- view configL - menv <- liftIO $ configProcessContextSettings config settings - mfound <- runRIO menv $ findExecutable $ T.unpack toolName - case mfound of - Left _ -> pure $ Just $ ToolWarning name (packageName p) - Right _ -> pure Nothing + let unknownTools = Set.toList $ packageUnknownTools p + -- Check whether the tool is on the PATH or a package executable before + -- warning about it. + warnings <- + fmap catMaybes $ forM unknownTools $ \name@(ExeName toolName) -> + runMaybeT $ notOnPath toolName *> notPackageExe toolName *> warn name tell mempty { wWarnings = (map toolWarningText warnings ++) } pure () + where + -- From Cabal 2.0, build-tools can specify a pre-built executable that should + -- already be on the PATH. + notOnPath toolName = MaybeT $ do + let settings = minimalEnvSettings { esIncludeLocals = True } + config <- view configL + menv <- liftIO $ configProcessContextSettings config settings + eFound <- runRIO menv $ findExecutable $ T.unpack toolName + skipIf $ isRight eFound + -- From Cabal 1.12, build-tools can specify another executable in the same + -- package. + notPackageExe toolName = MaybeT $ skipIf $ toolName `Set.member` packageExes p + warn name = MaybeT . pure . Just $ ToolWarning name (packageName p) + skipIf p' = pure $ if p' then Nothing else Just () -- | Warn about tools in the snapshot definition. States the tool name -- expected and the package name using it. From b5a350a75221a217111102ecb282d4cf8edeeb6c Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Tue, 19 Sep 2023 21:35:30 +0100 Subject: [PATCH 07/25] Improve missing dependency message, to cover build-tools --- src/Stack/Types/Build/Exception.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Stack/Types/Build/Exception.hs b/src/Stack/Types/Build/Exception.hs index f17b1237a5..d7e8443e81 100644 --- a/src/Stack/Types/Build/Exception.hs +++ b/src/Stack/Types/Build/Exception.hs @@ -699,8 +699,13 @@ pprintExceptions exceptions stackYaml stackRoot isImplicitGlobal parentMap wante [ flow "(no matching package and version found. Perhaps there is \ \an error in the specification of a package's" , style Shell "dependencies" + , "or" + , style Shell "build-tools" , flow "(Hpack) or" - , style Shell "build-depends" + , style Shell "build-depends" <> "," + , style Shell "build-tools" + , "or" + , style Shell "build-tool-depends" , flow "(Cabal file)" , flow "or an omission from the" , style Shell "packages" From a89b6a723cda0e97d85c21c3da17d962efaf33a4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 21 Sep 2023 12:44:03 +0800 Subject: [PATCH 08/25] list: output to stdout That was pretty bad - I had implemented list to log its output --- src/Stack/List.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stack/List.hs b/src/Stack/List.hs index 723a3dcec4..9476a437bb 100644 --- a/src/Stack/List.hs +++ b/src/Stack/List.hs @@ -8,6 +8,7 @@ module Stack.List ) where import Pantry ( loadSnapshot ) +import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Map as Map import RIO.Process ( HasProcessContext ) import Stack.Config ( makeConcreteResolver ) @@ -56,7 +57,7 @@ listPackages mSnapshot input = do case errs1 ++ errs2 of [] -> pure () errs -> prettyThrowM $ CouldNotParsePackageSelectors errs - mapM_ (prettyInfo . fromString . packageIdentifierString) locs + mapM_ (Lazy.putStrLn . fromString . packageIdentifierString) locs where toLoc | Just snapshot <- mSnapshot = toLocSnapshot snapshot | otherwise = toLocNoSnapshot From b4f73259e60321de7d96c8b397e65f3f94b40232 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 23 Sep 2023 01:24:18 +0100 Subject: [PATCH 09/25] Depend on rio-prettyprint-0.1.7.0 --- cabal.config | 2 +- package.yaml | 2 +- src/Stack/Prelude.hs | 47 ++++++++++----------------------------- stack-ghc-9.6.2.yaml | 3 +++ stack-ghc-9.6.2.yaml.lock | 9 +++++++- stack.cabal | 8 +++---- stack.yaml | 1 + stack.yaml.lock | 7 ++++++ 8 files changed, 37 insertions(+), 42 deletions(-) diff --git a/cabal.config b/cabal.config index ab93c6cc24..fafc01c338 100644 --- a/cabal.config +++ b/cabal.config @@ -152,7 +152,7 @@ constraints: , retry ==0.9.3.1 , rio ==0.1.22.0 , rio-orphans ==0.1.2.0 - , rio-prettyprint ==0.1.5.0 + , rio-prettyprint ==0.1.7.0 , rts ==1.0.2 , safe ==0.3.19 , safe-exceptions ==0.1.7.4 diff --git a/package.yaml b/package.yaml index 0bc5a5aa21..8fb11ca0b3 100644 --- a/package.yaml +++ b/package.yaml @@ -111,7 +111,7 @@ dependencies: - project-template - random - rio >= 0.1.22.0 -- rio-prettyprint >= 0.1.5.0 +- rio-prettyprint >= 0.1.7.0 - split - stm - tar diff --git a/src/Stack/Prelude.hs b/src/Stack/Prelude.hs index ef024456f9..0a99b6c356 100644 --- a/src/Stack/Prelude.hs +++ b/src/Stack/Prelude.hs @@ -103,18 +103,21 @@ import RIO as X import RIO.File as X hiding ( writeBinaryFileAtomic ) import RIO.PrettyPrint ( HasStylesUpdate (..), HasTerm (..), Pretty (..), Style (..) - , StyleDoc, (<+>), align, bulletedList, debugBracket - , displayWithColor, encloseSep, fill, fillSep, flow, hang - , hcat, hsep, indent, line, logLevelToStyle, mkNarrativeList + , StyleDoc, (<+>), align, blankLine, bulletedList + , debugBracket, encloseSep, fill, fillSep, flow, hang, hcat + , hsep, indent, line, logLevelToStyle, mkNarrativeList , parens, prettyDebug, prettyDebugL, prettyError - , prettyErrorL, prettyInfo, prettyInfoL, prettyInfoS - , prettyNote, prettyNoteL, prettyNoteS, prettyWarn - , prettyWarnL, prettyWarnNoIndent, prettyWarnS, punctuate - , sep, softbreak, softline, spacedBulletedList, string, style - , stylesUpdateL, useColorL, vsep, spacedBulletedList + , prettyErrorL, prettyGeneric, prettyInfo, prettyInfoL + , prettyInfoS, prettyNote, prettyNoteL, prettyNoteS + , prettyWarn, prettyWarnL, prettyWarnNoIndent, prettyWarnS + , punctuate, sep, softbreak, softline, spacedBulletedList + , string, style, stylesUpdateL, useColorL, vsep ) import RIO.PrettyPrint.DefaultStyles (defaultStyles) -import RIO.PrettyPrint.PrettyException ( PrettyException (..) ) +import RIO.PrettyPrint.PrettyException + ( PrettyException (..), ppException, prettyThrowIO + , prettyThrowM + ) import RIO.PrettyPrint.StylesUpdate ( StylesUpdate (..), parseStylesUpdateFromString ) import RIO.PrettyPrint.Types ( StyleSpec ) @@ -344,32 +347,6 @@ bugDeclaration = "The impossible happened!" bugRequest :: String bugRequest = "Please report this bug at Stack's repository." --- | A \'pretty\' blank line. -blankLine :: StyleDoc -blankLine = line <> line - --- | Provide the prettiest available information about an exception. -ppException :: SomeException -> StyleDoc -ppException e = case fromException e of - Just (PrettyException e') -> pretty e' - Nothing -> (string . displayException) e - --- | Synchronously throw the given exception as a 'PrettyException'. -prettyThrowIO :: (Exception e, MonadIO m, Pretty e) => e -> m a -prettyThrowIO = throwIO . PrettyException - --- | Throw the given exception as a 'PrettyException', when the action is run in --- the monad @m@. -prettyThrowM :: (Exception e, MonadThrow m, Pretty e) => e -> m a -prettyThrowM = throwM . PrettyException - -- | Maybe cons. mcons :: Maybe a -> [a] -> [a] mcons ma as = maybe as (:as) ma - -prettyGeneric :: - (HasTerm env, HasCallStack, Pretty b, MonadReader env m, MonadIO m) - => LogLevel - -> b - -> m () -prettyGeneric level = logGeneric "" level . display <=< displayWithColor diff --git a/stack-ghc-9.6.2.yaml b/stack-ghc-9.6.2.yaml index 214bbd5932..41a2526e84 100644 --- a/stack-ghc-9.6.2.yaml +++ b/stack-ghc-9.6.2.yaml @@ -4,6 +4,9 @@ # GHC 9.6.2 resolver: nightly-2023-09-16 +extra-deps: +- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 + docker: enable: false repo: glcr.b-data.ch/ghc/ghc-musl:9.6.2 diff --git a/stack-ghc-9.6.2.yaml.lock b/stack-ghc-9.6.2.yaml.lock index 9a3543e6a0..6d0966e953 100644 --- a/stack-ghc-9.6.2.yaml.lock +++ b/stack-ghc-9.6.2.yaml.lock @@ -3,7 +3,14 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: [] +packages: +- completed: + hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 + pantry-tree: + sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee + size: 779 + original: + hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 snapshots: - completed: sha256: a25fd287afcd300f35a2019a03c990169f7507ae0f43dfec763062c9ad891193 diff --git a/stack.cabal b/stack.cabal index ae627c1e28..617e4bfe49 100644 --- a/stack.cabal +++ b/stack.cabal @@ -383,7 +383,7 @@ library , project-template , random , rio >=0.1.22.0 - , rio-prettyprint >=0.1.5.0 + , rio-prettyprint >=0.1.7.0 , split , stm , tar @@ -501,7 +501,7 @@ executable stack , project-template , random , rio >=0.1.22.0 - , rio-prettyprint >=0.1.5.0 + , rio-prettyprint >=0.1.7.0 , split , stack , stm @@ -600,7 +600,7 @@ executable stack-integration-test , project-template , random , rio >=0.1.22.0 - , rio-prettyprint >=0.1.5.0 + , rio-prettyprint >=0.1.7.0 , split , stm , tar @@ -713,7 +713,7 @@ test-suite stack-unit-test , random , raw-strings-qq , rio >=0.1.22.0 - , rio-prettyprint >=0.1.5.0 + , rio-prettyprint >=0.1.7.0 , split , stack , stm diff --git a/stack.yaml b/stack.yaml index 0346c747d1..725a63947c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -20,6 +20,7 @@ extra-deps: - optparse-applicative-0.18.1.0@sha256:b4cf8d9018e5e67cb1f14edb5130b6d05ad8bc1b5f6bd4efaa6ec0b7f28f559d,5132 - optparse-generic-1.5.1@sha256:c65a7d3429feedf870f5a9f7f0d2aaf75609888b52449f85f22871b5f5a7e95f,2204 - pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650 +- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627 - tar-conduit-0.4.0@sha256:f333649770f5ec42a83a93b0d424cf6bb895d80dfbee05a54340395f81d036ae,3126 - tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571 diff --git a/stack.yaml.lock b/stack.yaml.lock index 7b1041d68f..539f267c76 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -116,6 +116,13 @@ packages: size: 2665 original: hackage: pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650 +- completed: + hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 + pantry-tree: + sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee + size: 779 + original: + hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - completed: hackage: static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627 pantry-tree: From 7956279b8870ca472bd5a9ce56ea2791067ac315 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 23 Sep 2023 00:34:24 +0100 Subject: [PATCH 10/25] Re #6250 Output to standard output, not standard error Also uses terms standard output stream and standard error stream consistently in documentation. --- ChangeLog.md | 5 ++-- doc/build_command.md | 12 ++++---- doc/dot_command.md | 2 +- doc/global_flags.md | 6 ++-- doc/ide_command.md | 8 ++--- doc/list_command.md | 23 ++++++++------- doc/templates_command.md | 4 +-- doc/uninstall_command.md | 6 ++-- doc/yaml_configuration.md | 8 ++--- src/Stack/ConfigCmd.hs | 2 +- src/Stack/IDE.hs | 6 ++-- src/Stack/Prelude.hs | 28 +++++++++++++----- src/Stack/Templates.hs | 4 +-- src/Stack/Uninstall.hs | 61 ++++++++++++++++++++------------------- 14 files changed, 95 insertions(+), 80 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 402af42e41..7fb9ca5201 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,7 +10,8 @@ Major changes: Behavior changes: -* `stack list` outputs to standard output rather than to standard error. +* `stack list`, `stack templates` and `stack uninstall` output to the standard + output stream rather than to the standard error stream. Other enhancements: @@ -185,7 +186,7 @@ Behavior changes: [Haskell Error Index](https://errors.haskell.org/) initiative, all Stack error messages generated by Stack itself begin with an unique code in the form `[S-nnnn]`, where `nnnn` is a four-digit number. -* Test suite executables that seek input on the standard input channel (`stdin`) +* Test suite executables that seek input on the standard input stream (`stdin`) will not throw an exception. Previously, they would thow an exception, consistent with Cabal's 'exitcode-stdio-1.0' test suite interface specification. Pass the flag `--no-tests-allow-stdin` to `stack build` to diff --git a/doc/build_command.md b/doc/build_command.md index 15c5a76604..04a393bb38 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -555,14 +555,14 @@ package is targetted in a multi-package project (for example, using `stack build `). * **One target package:** The build output for the target package is sent to the - standard error output stream of the console as it happens. + standard error stream of the console as it happens. * **More than one target package:** The build output from GHC (as opposed to from Stack) for each target package is sent to a log file for that package, unless an error occurs that prevents that. At the end of the build, the location of the directory containing the log files is reported. To also output - the contents of the log files to the standard error output stream of the - console at the end of the build, use Stack's `dump-logs` option. For further + the contents of the log files to the standard error stream of the console at + the end of the build, use Stack's `dump-logs` option. For further information about that option, see the [YAML configuration](yaml_configuration.md#dump-logs) documentation. The default `dump-logs` mode is to output the contents of the log files that are @@ -606,10 +606,10 @@ Default: Enabled Cabal defines a test suite interface ['exitcode-stdio-1.0'](https://hackage.haskell.org/package/Cabal-syntax-3.8.1.0/docs/Distribution-Types-TestSuiteInterface.html#v:TestSuiteExeV1.0) where the test suite takes the form of an executable and the executable takes -nothing on the standard input channel (`stdin`). Pass this flag to override that -specification and allow the executable to receive input on that channel. If you +nothing on the standard input stream (`stdin`). Pass this flag to override that +specification and allow the executable to receive input on that stream. If you pass `--no-tests-allow-stdin` and the executable seeks input on the standard -input channel, an exception will be thown. +input stream, an exception will be thown. ## Examples diff --git a/doc/dot_command.md b/doc/dot_command.md index a332aaddaf..aa64240a35 100644 --- a/doc/dot_command.md +++ b/doc/dot_command.md @@ -15,7 +15,7 @@ graphs and the `dot` executable for drawing directed graphs. Graphviz is available to [download](https://www.graphviz.org/download/) for Linux, Windows, macOS and FreeBSD. -`stack dot` produces output, to the standard output channel, in the DOT language +`stack dot` produces output, to the standard output stream, in the DOT language to represent the relationships between your packages and their dependencies. By default: diff --git a/doc/global_flags.md b/doc/global_flags.md index 671e2f0aca..731d469a21 100644 --- a/doc/global_flags.md +++ b/doc/global_flags.md @@ -87,8 +87,8 @@ specific configuration [option](yaml_configuration.md#ghc-variant). ## `--hpack-numeric-version` flag Pass the flag `--hpack-numeric-version` to cause Stack to report the numeric -version of its built-in Hpack library to standard output (e.g. `0.35.0`) and -quit. +version of its built-in Hpack library to the standard output stream (e.g. +`0.35.0`) and quit. ## `--[no-]install-ghc` flag @@ -158,7 +158,7 @@ Stack can be configured to integrate with Nix. For further information, see ## `--numeric-version` flag Pass the flag `--numeric-version` to cause Stack to report its numeric version -to standard output (e.g. `2.9.1`) and quit. +to the standard output stream (e.g. `2.9.1`) and quit. ## `--[no-]plan-in-log` flag diff --git a/doc/ide_command.md b/doc/ide_command.md index 279decf15a..84f92a8fca 100644 --- a/doc/ide_command.md +++ b/doc/ide_command.md @@ -24,8 +24,8 @@ stack ide packages [--stdout] [--cabal-files] By default: -* its output is sent to the standard error channel. Pass the flag `--stdout` to - change to the standard output channel; and +* its output is sent to the standard error stream. Pass the flag `--stdout` to + change to the standard output stream; and * the output is the package name (without its version). Pass the flag `--cabal-files` to change to the full path to the package's Cabal file. @@ -39,8 +39,8 @@ stack ide targets [--exes] [--tests] [--benchmarks] [--stdout] or more of the flags `--exes`, `--tests` and `--benchmarks` to list only targets of those component types. -By default, its output is sent to the standard error channel. Pass the flag -`--stdout` to change to the standard output channel. +By default, its output is sent to the standard error stream. Pass the flag +`--stdout` to change to the standard output stream. For example, for the Stack project itself, command: diff --git a/doc/list_command.md b/doc/list_command.md index 6061388f6b..b84b3bb8d2 100644 --- a/doc/list_command.md +++ b/doc/list_command.md @@ -8,21 +8,22 @@ stack list [PACKAGE] ~~~ -`stack list ` will list the latest version of the package from -Hackage. If the package name cannot be found on Hackage, even after updating the -package index, suggestions (not necessarily good ones) will be made about the -intended package name. +`stack list ` will send to the standard output stream the latest +version of the package from Hackage. If the package name cannot be found on +Hackage, even after updating the package index, suggestions (not necessarily +good ones) will be made about the intended package name. -`stack --resolver list ` will list the version of the -package in the specified snapshot, unless the package comes with GHC on -Unix-like operating systems. If the package name cannot be found in the -snapshot, the command will fail, identifying only the package(s) that did not -appear in the snapshot. +`stack --resolver list ` will send to the standard +output stream the version of the package in the specified snapshot, unless the +package comes with GHC on Unix-like operating systems. If the package name +cannot be found in the snapshot, the command will fail, identifying only the +package(s) that did not appear in the snapshot. More than one package name can be specified. -`stack --resolver list` will list all the packages in the specified -snapshot, except those which come with GHC on Unix-like operating systems. +`stack --resolver list` will send to the standard output stream a +list of all the packages in the specified snapshot, except those which come with +GHC on Unix-like operating systems. For example: diff --git a/doc/templates_command.md b/doc/templates_command.md index ef0f5d2b1e..76fab60661 100644 --- a/doc/templates_command.md +++ b/doc/templates_command.md @@ -6,8 +6,8 @@ stack templates ~~~ -`stack templates` provides information about project templates used with the -[`stack new` command](new_command.md). +`stack templates` provides information to the standard output stream about +project templates used with the [`stack new` command](new_command.md). Project templates are specified in `.hsfiles` files. The format of those files is documented at the diff --git a/doc/uninstall_command.md b/doc/uninstall_command.md index afe34465ed..411c879fb7 100644 --- a/doc/uninstall_command.md +++ b/doc/uninstall_command.md @@ -6,6 +6,6 @@ stack uninstall ~~~ -`stack uninstall` provides information about how to uninstall Stack or a -Stack-supplied tool (such as GHC or, on Windows, MSYS2). It does not -itself uninstall Stack or a Stack-supplied tool. +`stack uninstall` provides information to the standard output stream about how +to uninstall Stack or a Stack-supplied tool (such as GHC or, on Windows, MSYS2). +It does not itself uninstall Stack or a Stack-supplied tool. diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index a3d1e5fd24..4739b1ee90 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -796,8 +796,8 @@ unless an error occurs that prevents that. For further information, see the documentation. The value of the `dump-logs` key controls what, if any, log file content is sent -('dumped') to the standard error output stream of the console at the end of the -build. Possible values are: +('dumped') to the standard error stream of the console at the end of the build. +Possible values are: ~~~yaml dump-logs: none # don't dump the content of any log files @@ -810,8 +810,8 @@ At the command line, `--no-dump-logs` is equivalent to `dump-logs: none` and If GHC reports an error during the build and a log file is created, that build output will be included in the log file. Stack will also report errors during -building to the standard error output stream. That stream can be piped to a -file. For example, for a file named `stderr.log`: +building to the standard error stream. That stream can be piped to a file. For +example, for a file named `stderr.log`: ~~~text stack --no-dump-logs --color always build --no-interleaved-output 2> stderr.log diff --git a/src/Stack/ConfigCmd.hs b/src/Stack/ConfigCmd.hs index f559811e80..7bcabe47ab 100644 --- a/src/Stack/ConfigCmd.hs +++ b/src/Stack/ConfigCmd.hs @@ -364,4 +364,4 @@ cfgCmdEnv es = do encodeUtf8Builder key <> ";\n" escape '\'' = "'\"'\"'" escape c = T.singleton c - hPutBuilder stdout $ Map.foldMapWithKey toLine actions + putBuilder $ Map.foldMapWithKey toLine actions diff --git a/src/Stack/IDE.hs b/src/Stack/IDE.hs index fcf3e29646..72ce78f2a0 100644 --- a/src/Stack/IDE.hs +++ b/src/Stack/IDE.hs @@ -29,13 +29,13 @@ import Stack.Types.SourceMap ( ProjectPackage (..), SMWanted (..), ppComponentsMaybe ) import System.IO ( putStrLn ) --- Type representing output channel choices for the @stack ide packages@ and +-- Type representing output stream choices for the @stack ide packages@ and -- @stack ide targets@ commands. data OutputStream = OutputLogInfo - -- ^ To the same output channel as other log information. + -- ^ To the same output stream as other log information. | OutputStdout - -- ^ To the standard output channel. + -- ^ To the standard output stream. -- Type representing output choices for the @stack ide packages@ command. data ListPackagesCmd diff --git a/src/Stack/Prelude.hs b/src/Stack/Prelude.hs index 0a99b6c356..dd750fdc59 100644 --- a/src/Stack/Prelude.hs +++ b/src/Stack/Prelude.hs @@ -23,6 +23,8 @@ module Stack.Prelude , bugReport , bugPrettyReport , blankLine + , putUtf8Builder + , putBuilder , ppException , prettyThrowIO , prettyThrowM @@ -46,6 +48,7 @@ module Stack.Prelude , bulletedList , debugBracket , defaultStyles + , displayWithColor , encloseSep , fill , fillSep @@ -104,14 +107,15 @@ import RIO.File as X hiding ( writeBinaryFileAtomic ) import RIO.PrettyPrint ( HasStylesUpdate (..), HasTerm (..), Pretty (..), Style (..) , StyleDoc, (<+>), align, blankLine, bulletedList - , debugBracket, encloseSep, fill, fillSep, flow, hang, hcat - , hsep, indent, line, logLevelToStyle, mkNarrativeList - , parens, prettyDebug, prettyDebugL, prettyError - , prettyErrorL, prettyGeneric, prettyInfo, prettyInfoL - , prettyInfoS, prettyNote, prettyNoteL, prettyNoteS - , prettyWarn, prettyWarnL, prettyWarnNoIndent, prettyWarnS - , punctuate, sep, softbreak, softline, spacedBulletedList - , string, style, stylesUpdateL, useColorL, vsep + , debugBracket, displayWithColor, encloseSep, fill, fillSep + , flow, hang, hcat, hsep, indent, line, logLevelToStyle + , mkNarrativeList, parens, prettyDebug, prettyDebugL + , prettyError, prettyErrorL, prettyGeneric, prettyInfo + , prettyInfoL, prettyInfoS, prettyNote, prettyNoteL + , prettyNoteS, prettyWarn, prettyWarnL, prettyWarnNoIndent + , prettyWarnS, punctuate, sep, softbreak, softline + , spacedBulletedList, string, style, stylesUpdateL, useColorL + , vsep ) import RIO.PrettyPrint.DefaultStyles (defaultStyles) import RIO.PrettyPrint.PrettyException @@ -350,3 +354,11 @@ bugRequest = "Please report this bug at Stack's repository." -- | Maybe cons. mcons :: Maybe a -> [a] -> [a] mcons ma as = maybe as (:as) ma + +-- | Write a 'Utf8Builder' to the standard output stream. +putUtf8Builder :: MonadIO m => Utf8Builder -> m () +putUtf8Builder = putBuilder . getUtf8Builder + +-- | Write a 'Builder' to the standard output stream. +putBuilder :: MonadIO m => Builder -> m () +putBuilder = hPutBuilder stdout diff --git a/src/Stack/Templates.hs b/src/Stack/Templates.hs index f41d38e85d..352221f290 100644 --- a/src/Stack/Templates.hs +++ b/src/Stack/Templates.hs @@ -8,7 +8,7 @@ module Stack.Templates ) where import qualified Data.ByteString.Lazy as LB -import qualified Data.Text as T +import qualified Data.Text.IO as T import Network.HTTP.StackClient ( HttpException (..), getResponseBody, httpLbs, parseUrlThrow , setGitHubHeaders @@ -69,7 +69,7 @@ templatesHelp = do (prettyThrowM . DownloadTemplatesHelpFailed) case decodeUtf8' $ LB.toStrict $ getResponseBody resp of Left err -> prettyThrowM $ TemplatesHelpEncodingInvalid url err - Right txt -> prettyInfo (string $ T.unpack txt) + Right txt -> liftIO $ T.putStrLn txt -- | Default web URL to get the `stack templates` help output. defaultTemplatesHelpUrl :: String diff --git a/src/Stack/Uninstall.hs b/src/Stack/Uninstall.hs index b4f114c3bd..c4dbdfd1b4 100644 --- a/src/Stack/Uninstall.hs +++ b/src/Stack/Uninstall.hs @@ -6,14 +6,14 @@ module Stack.Uninstall ( uninstallCmd ) where -import Stack.Constants ( osIsWindows ) -import Stack.Prelude -import Stack.Runners ( ShouldReexec (..), withConfig ) -import Stack.Types.Config - ( configL, configLocalBin, configLocalProgramsBase - , stackGlobalConfigL, stackRootL - ) -import Stack.Types.Runner ( Runner ) +import Stack.Constants ( osIsWindows ) +import Stack.Prelude +import Stack.Runners ( ShouldReexec (..), withConfig ) +import Stack.Types.Config + ( configL, configLocalBin, configLocalProgramsBase + , stackGlobalConfigL, stackRootL + ) +import Stack.Types.Runner ( Runner ) -- | Function underlying the @stack uninstall@ command. Display help for the -- command. @@ -28,8 +28,8 @@ uninstallCmd () = withConfig NoReexec $ do globalConfig' = toStyleDoc globalConfig programsDir' = toStyleDoc programsDir localBinDir' = toStyleDoc localBinDir - prettyInfo $ - vsep + putUtf8Builder =<< displayWithColor + ( vsep [ flow "To uninstall Stack, it should be sufficient to delete:" , hang 4 $ fillSep [ flow "(1) the directory containing Stack's tools" @@ -59,26 +59,27 @@ uninstallCmd () = withConfig NoReexec $ do , flow "directories in any Haskell projects that you have built." ] ] - <> blankLine - <> vsep - [ fillSep - [ flow "To uninstall completely a Stack-supplied tool (such as \ - \GHC or, on Windows, MSYS2), delete from Stack's tools \ - \directory" - , parens programsDir' <> ":" - ] - , hang 4 $ fillSep - [ flow "(1) the tool's subdirectory;" - ] - , hang 4 $ fillSep - [ flow "(2) the tool's archive file" - , parens (style File ".tar.xz") <> "; and" - ] - , hang 4 $ fillSep - [ flow "(3) the file marking that the tool is installed" - , parens (style File ".installed") <> "." - ] - ] + <> blankLine + <> vsep + [ fillSep + [ flow "To uninstall completely a Stack-supplied tool (such as \ + \GHC or, on Windows, MSYS2), delete from Stack's tools \ + \directory" + , parens programsDir' <> ":" + ] + , hang 4 $ fillSep + [ flow "(1) the tool's subdirectory;" + ] + , hang 4 $ fillSep + [ flow "(2) the tool's archive file" + , parens (style File ".tar.xz") <> "; and" + ] + , hang 4 $ fillSep + [ flow "(3) the file marking that the tool is installed" + , parens (style File ".installed") <> "." + ] + ] + ) where styleShell = style Shell howToFindStack From e2fc5ac752805ba2404f6548de3cb3e9b31159ef Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 23 Sep 2023 17:33:02 +0100 Subject: [PATCH 11/25] Fix typo in documentation --- doc/hpc_command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/hpc_command.md b/doc/hpc_command.md index 511020d3ce..2f504d45cb 100644 --- a/doc/hpc_command.md +++ b/doc/hpc_command.md @@ -37,7 +37,7 @@ The `stack hpc report` command generates a report for a selection of targets and Pass the flag `--all` for a report that uses all stored results. -Pass the flag --open` to open the HTML report in your browser. +Pass the flag `--open` to open the HTML report in your browser. ## The `extra-tix-files` directory From a0db2a6112e35bfae0c71c58598aaa1f4dcd926f Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 23 Sep 2023 21:22:06 +0100 Subject: [PATCH 12/25] Re #6250 Output summary reports to stdout, not stderr Distinguishes logging from the summary reports themselves. --- ChangeLog.md | 5 +-- doc/hpc_command.md | 25 ++++++++------ src/Stack/Coverage.hs | 34 ++++++++++++------- .../tests/3997-coverage-with-cabal-3/Main.hs | 2 +- .../Main.hs | 23 +++++++------ tests/integration/tests/multi-test/Main.hs | 4 +-- 6 files changed, 53 insertions(+), 40 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 7fb9ca5201..72ec5ce55a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,8 +10,9 @@ Major changes: Behavior changes: -* `stack list`, `stack templates` and `stack uninstall` output to the standard - output stream rather than to the standard error stream. +* `stack hpc report`, `stack list`, `stack templates` and `stack uninstall` + output their information to the standard output stream rather than to the + standard error stream. Logging is still to the standard error stream. Other enhancements: diff --git a/doc/hpc_command.md b/doc/hpc_command.md index 2f504d45cb..4bc126b214 100644 --- a/doc/hpc_command.md +++ b/doc/hpc_command.md @@ -63,8 +63,9 @@ unified report with just two, we can instead command: stack hpc report A B ~~~ -This will output a textual report for the combined coverage from `A` and `B`'s -test suites, along with a path to the HTML for the report. +This will output to the standard output stream a summary report for the combined +coverage from `A` and `B`'s test suites. It will also log the path to the HTML +for the corresponding full report. This command also supports taking extra `.tix` files. If you've also built an executable, against exactly the same library versions of `A`, `B`, and `C`, then @@ -101,13 +102,17 @@ This report will consider all test results as well as the newly generated When your project has these properties, you will get the following: -1. Textual coverage reports in the build output. +1. Summary coverage reports, sent to the standard output stream in the build + output, and a log of the paths to the HTML for the corresponding full + reports. -2. A unified textual and HTML report, considering the coverage on all local - libraries, based on all of the tests that were run. +2. A summary unified report, sent to the standard output stream, and a log of + the path to the HTML for the corresponding full report. These reports + consider the coverage on all local libraries, based on all of the tests that + were run. 3. An index of all generated HTML reports, in `index.html` in the local - HPC root directory. + HPC root directory, and a log of the path to the HTML for that index. ## Implementation details @@ -147,10 +152,10 @@ However, advanced users may want to understand exactly how `--coverage` works: executable. See issue [#1359](https://github.com/commercialhaskell/stack/issues/1359). -5. Once we have a `.tix` file for a test, we also generate a textual and HTML - report for it. The textual report is sent to the terminal. The index of the - test-specific HTML report is available `pkg-name/test-name/index.html` in the - local HPC root directory. +5. Once we have a `.tix` file for a test, we also generate a summary report and + a corresponding full report using HTML. The summary report is sent to the + standard output stream. The index of the test-specific HTML report is + available at `pkg-name/test-name/index.html` in the local HPC root directory. 6. After the build completes, if there are multiple output `*.tix` files, they get combined into a unified report. The index of this report will be diff --git a/src/Stack/Coverage.hs b/src/Stack/Coverage.hs index 94bbe41714..eea6df2099 100644 --- a/src/Stack/Coverage.hs +++ b/src/Stack/Coverage.hs @@ -14,8 +14,7 @@ module Stack.Coverage , generateHpcMarkupIndex ) where -import qualified Data.ByteString.Char8 as S8 -import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.List as L import qualified Data.Map.Strict as Map import qualified Data.Set as Set @@ -32,6 +31,7 @@ import Path.IO , ignoringAbsence, listDir, removeDirRecur, removeFile , resolveDir', resolveFile' ) +import RIO.ByteString.Lazy ( putStrLn ) import RIO.Process ( ProcessException, proc, readProcess_ ) import Stack.Build.Target ( NeedTargets (..) ) import Stack.Constants @@ -212,9 +212,9 @@ generateHpcReport pkgDir package tests = do tixSrc <- tixFilePath (packageName package) (T.unpack testName) let report = fillSep [ flow "coverage report for" - , fromString pkgName' <> "'s" + , style Current (fromString pkgName') <> "'s" , "test-suite" - , fromString $ "\"" <> T.unpack testName <> "\"" + , style PkgComponent (fromString $ T.unpack testName) ] reportHtml = "coverage report for" @@ -289,14 +289,15 @@ generateHpcReportInternal tixSrc reportDir report reportHtml extraMarkupArgs ext [ "Generating" , report <> "." ] - outputLines <- map (S8.filter (/= '\r')) . S8.lines . BL.toStrict . fst <$> + -- Strip @\r@ characters because Windows. + outputLines <- map (L8.filter (/= '\r')) . L8.lines . fst <$> proc "hpc" ( "report" : toFilePath tixSrc : (args ++ extraReportArgs) ) readProcess_ - if all ("(0/0)" `S8.isSuffixOf`) outputLines + if all ("(0/0)" `L8.isSuffixOf`) outputLines then do let msgHtml = "Error: [S-6829]\n\ @@ -327,9 +328,16 @@ generateHpcReportInternal tixSrc reportDir report reportHtml extraMarkupArgs ext pure Nothing else do let reportPath = reportDir relFileHpcIndexHtml - -- Print output, stripping @\r@ characters because Windows. - forM_ outputLines (logInfo . displayBytesUtf8) - -- Generate the markup. + -- Print the summary report to the standard output stream. + putUtf8Builder =<< displayWithColor + ( fillSep + [ "Summary" + , report <> ":" + ] + <> line + ) + forM_ outputLines putStrLn + -- Generate the HTML markup. void $ proc "hpc" ( "markup" : toFilePath tixSrc @@ -392,8 +400,8 @@ generateHpcReportForTargets opts tixFiles targetNames = do dest <- resolveDir' destDir ensureDir dest pure dest - let report = flow "combined report" - reportHtml = "combined report" + let report = flow "combined coverage report" + reportHtml = "combined coverage report" mreportPath <- generateUnionReport report reportHtml reportDir tixPaths forM_ mreportPath $ \reportPath -> if hroptsOpenBrowser opts @@ -429,8 +437,8 @@ generateHpcUnifiedReport = do , flow "so not generating a unified coverage report." ] else do - let report = flow "unified report" - reportHtml = "unified report" + let report = flow "unified coverage report" + reportHtml = "unified coverage report" mreportPath <- generateUnionReport report reportHtml reportDir tixFiles forM_ mreportPath (displayReportPath "The" report . pretty) diff --git a/tests/integration/tests/3997-coverage-with-cabal-3/Main.hs b/tests/integration/tests/3997-coverage-with-cabal-3/Main.hs index 56d487f527..9e3d9a0e65 100644 --- a/tests/integration/tests/3997-coverage-with-cabal-3/Main.hs +++ b/tests/integration/tests/3997-coverage-with-cabal-3/Main.hs @@ -6,5 +6,5 @@ main :: IO () main = do stack ["setup"] stackCheckStderr ["test", "--coverage"] $ \out -> do - unless ("The coverage report for foo's test-suite \"foo-test\" is available at" `isInfixOf` out) $ + unless ("The coverage report for foo's test-suite foo-test is available at" `isInfixOf` out) $ fail "Coverage report didn't build" diff --git a/tests/integration/tests/4105-test-coverage-of-internal-lib/Main.hs b/tests/integration/tests/4105-test-coverage-of-internal-lib/Main.hs index f03c0433fc..8a02ae060e 100644 --- a/tests/integration/tests/4105-test-coverage-of-internal-lib/Main.hs +++ b/tests/integration/tests/4105-test-coverage-of-internal-lib/Main.hs @@ -1,19 +1,20 @@ -import Control.Monad (unless) -import Data.List (isInfixOf, isPrefixOf) +import Control.Monad ( unless ) +import Data.List ( isInfixOf, isPrefixOf ) import StackTest main :: IO () main = do stack ["clean"] - stack ["build"] - res <- getCoverageLines . snd <$> stackStderr ["test", "--coverage", "--color", "never"] - case res of - _:exprs:_ -> unless ("2/2" `isInfixOf` exprs) testFail - _ -> testFail - where - testFail = fail "Stack didn't generate coverage from both libraries" + stackCheckStdout ["test", "--coverage", "--color", "never"] check + +check :: String -> IO () +check output = case getCoverageLines output of + _:exprs:_ -> unless ("2/2" `isInfixOf` exprs) testFail + _ -> testFail + where + testFail = fail "Stack didn't generate coverage from both libraries" getCoverageLines :: String -> [String] getCoverageLines = dropWhile (not . isCoverageHeader) . lines - where - isCoverageHeader = isPrefixOf "Generating coverage report for " + where + isCoverageHeader = isPrefixOf "Summary coverage report for " diff --git a/tests/integration/tests/multi-test/Main.hs b/tests/integration/tests/multi-test/Main.hs index e133c872bb..56f21042ea 100644 --- a/tests/integration/tests/multi-test/Main.hs +++ b/tests/integration/tests/multi-test/Main.hs @@ -4,12 +4,10 @@ import StackTest main :: IO () main = do - stack ["build"] - stack ["test"] -- FIXME: Make 'clean' unnecessary (see #1411) stack ["clean"] stackCheckStderr ["test", "--coverage"] $ \out -> do - unless ("The coverage report for multi-test-suite's test-suite \"multi-test-suite-test\" is available at" `isInfixOf` out) $ + unless ("The coverage report for multi-test-suite's test-suite multi-test-suite-test is available at" `isInfixOf` out) $ fail "Didn't get expected report for multi-test-suite-test" unless ("[S-6829]" `isInfixOf` out) $ fail "Didn't get expected empty report for multi-test-suite-test-2" From 876380e5d9bae9661e938328f1fd842c77e50662 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 24 Sep 2023 00:37:01 +0100 Subject: [PATCH 13/25] Minor improvements to online documentation --- doc/yaml_configuration.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 4739b1ee90..8f223ae64f 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -1278,29 +1278,26 @@ issues for Stackage maintenance. [:octicons-tag-24: 2.1.1](https://github.com/commercialhaskell/stack/releases/tag/v2.1.1) +Default: `true` + When Stack notices that a new version of Stack is available, should it notify the user? -~~~yaml -recommend-stack-upgrade: true -~~~ - ### rebuild-ghc-options [:octicons-tag-24: 0.1.6.0](https://github.com/commercialhaskell/stack/releases/tag/v0.1.6.0) Default: `false` -Should we rebuild a package when its GHC options change? Before Stack 0.1.6, -this was a non-configurable `true`. However, in most cases, the flag is used to -affect optimization levels and warning behavior, for which GHC itself doesn't -actually recompile the modules anyway. Therefore, the new behavior is to not -recompile on an options change, but this behavior can be changed back with the -following: +Should Stack rebuild a package when its GHC options change? -~~~yaml -rebuild-ghc-options: true -~~~ +The default value reflects that, in most cases, GHC options are used to affect +optimization levels and warning behavior, for which GHC does not recompile the +modules. + +!!! note + + Before Stack 0.1.6.0, Stack rebuilt a package when its GHC options changed. ### require-stack-version From 6b0bfa2c3b8c90559acc3938d75420b93111e7f9 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 24 Sep 2023 01:41:17 +0100 Subject: [PATCH 14/25] Bump to Hpack 0.36.0 --- ChangeLog.md | 2 ++ cabal.config | 2 +- package.yaml | 2 +- stack-ghc-9.6.2.yaml | 2 +- stack-ghc-9.6.2.yaml.lock | 8 ++++---- stack.cabal | 8 ++++---- stack.yaml | 2 +- stack.yaml.lock | 6 +++--- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 72ec5ce55a..3c3f669ba6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -16,6 +16,8 @@ Behavior changes: Other enhancements: +* Bump to Hpack 0.36.0. + Bug fixes: * Restore message suffix `due to warnings` with `dump-logs: warning` (broken diff --git a/cabal.config b/cabal.config index fafc01c338..5da9f2eebd 100644 --- a/cabal.config +++ b/cabal.config @@ -90,7 +90,7 @@ constraints: , hi-file-parser ==0.1.4.0 , hinotify ==0.4.1 , hourglass ==0.2.12 - , hpack ==0.35.5 + , hpack ==0.36.0 , hpc ==0.6.1.0 , http-api-data ==0.5 , http-client ==0.7.14 diff --git a/package.yaml b/package.yaml index 8fb11ca0b3..c61984fcd8 100644 --- a/package.yaml +++ b/package.yaml @@ -84,7 +84,7 @@ dependencies: - generic-deriving - ghc-boot - hi-file-parser >= 0.1.4.0 -- hpack >= 0.35.3 +- hpack >= 0.36.0 - hpc - http-client - http-client-tls >= 0.3.6.2 diff --git a/stack-ghc-9.6.2.yaml b/stack-ghc-9.6.2.yaml index 41a2526e84..18cc47f8cd 100644 --- a/stack-ghc-9.6.2.yaml +++ b/stack-ghc-9.6.2.yaml @@ -2,7 +2,7 @@ # built with GHC 9.6.2. # GHC 9.6.2 -resolver: nightly-2023-09-16 +resolver: nightly-2023-09-22 extra-deps: - rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 diff --git a/stack-ghc-9.6.2.yaml.lock b/stack-ghc-9.6.2.yaml.lock index 6d0966e953..49c8f31b23 100644 --- a/stack-ghc-9.6.2.yaml.lock +++ b/stack-ghc-9.6.2.yaml.lock @@ -13,7 +13,7 @@ packages: hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 snapshots: - completed: - sha256: a25fd287afcd300f35a2019a03c990169f7507ae0f43dfec763062c9ad891193 - size: 667855 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/9/16.yaml - original: nightly-2023-09-16 + sha256: 93137bc0122de394fa2c43e933971b2996cd7dc600989b721ad971810b9a2f3f + size: 669537 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/9/22.yaml + original: nightly-2023-09-22 diff --git a/stack.cabal b/stack.cabal index 617e4bfe49..55f0f9d684 100644 --- a/stack.cabal +++ b/stack.cabal @@ -359,7 +359,7 @@ library , generic-deriving , ghc-boot , hi-file-parser >=0.1.4.0 - , hpack >=0.35.3 + , hpack >=0.36.0 , hpc , http-client , http-client-tls >=0.3.6.2 @@ -477,7 +477,7 @@ executable stack , generic-deriving , ghc-boot , hi-file-parser >=0.1.4.0 - , hpack >=0.35.3 + , hpack >=0.36.0 , hpc , http-client , http-client-tls >=0.3.6.2 @@ -574,7 +574,7 @@ executable stack-integration-test , generic-deriving , ghc-boot , hi-file-parser >=0.1.4.0 - , hpack >=0.35.3 + , hpack >=0.36.0 , hpc , hspec , http-client @@ -687,7 +687,7 @@ test-suite stack-unit-test , generic-deriving , ghc-boot , hi-file-parser >=0.1.4.0 - , hpack >=0.35.3 + , hpack >=0.36.0 , hpc , hspec , http-client diff --git a/stack.yaml b/stack.yaml index 725a63947c..550abd0aef 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,7 +14,7 @@ extra-deps: - crypton-x509-system-1.6.7@sha256:023ed573d82983bc473a37a89e0434a085b413be9f68d07e085361056afd4637,1532 - crypton-x509-validation-1.6.12@sha256:85989721b64be4b90de9f66ef641c26f57575cffed1a50d707065fb60176f386,2227 # lts-21.12 specifies hpack-0.35.2 -- hpack-0.35.5@sha256:22b46f28b53ec6fb2d05517b569a74b8b3e5e8c2e89c6b7ca25b345af62f22fa,5119 +- hpack-0.36.0@sha256:c2daa6556afc57367a5d1dbd878bf515d442d201e24b27473051359abd47ed08,5187 - http-client-tls-0.3.6.3@sha256:a5909ce412ee65c141b8547f8fe22236f175186c95c708e86a46b5547394f910,2046 - http-download-0.2.1.0@sha256:a97863e96f7d44efc3d0e3061db7fe2540b8374ca44ae90d0b56040140cb7506,1716 - optparse-applicative-0.18.1.0@sha256:b4cf8d9018e5e67cb1f14edb5130b6d05ad8bc1b5f6bd4efaa6ec0b7f28f559d,5132 diff --git a/stack.yaml.lock b/stack.yaml.lock index 539f267c76..917be59e96 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -75,12 +75,12 @@ packages: original: hackage: crypton-x509-validation-1.6.12@sha256:85989721b64be4b90de9f66ef641c26f57575cffed1a50d707065fb60176f386,2227 - completed: - hackage: hpack-0.35.5@sha256:22b46f28b53ec6fb2d05517b569a74b8b3e5e8c2e89c6b7ca25b345af62f22fa,5119 + hackage: hpack-0.36.0@sha256:c2daa6556afc57367a5d1dbd878bf515d442d201e24b27473051359abd47ed08,5187 pantry-tree: - sha256: d129102d5c4a66111877f48f6f4ba93615df574eb85195faf185c53a3cb215bd + sha256: 981e8f8ab3dc8305c5131f4686c835f55d4a841abcc867bfdcbf9e6757e9a638 size: 3742 original: - hackage: hpack-0.35.5@sha256:22b46f28b53ec6fb2d05517b569a74b8b3e5e8c2e89c6b7ca25b345af62f22fa,5119 + hackage: hpack-0.36.0@sha256:c2daa6556afc57367a5d1dbd878bf515d442d201e24b27473051359abd47ed08,5187 - completed: hackage: http-client-tls-0.3.6.3@sha256:a5909ce412ee65c141b8547f8fe22236f175186c95c708e86a46b5547394f910,2046 pantry-tree: From c39d9285bd7a97db8781eedb67c88ad3555b82b8 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 24 Sep 2023 20:10:47 +0100 Subject: [PATCH 15/25] Ignore .DS_Store files on macOS --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index dd5ec77804..9118660e6d 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,9 @@ stan.html # HSpec-related .hspec-failures +# macOS-related +.DS_Store + # Unexplained *~ *.imports From 32e08a7949211de09d4bfcfb2b828adac61d99db Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 24 Sep 2023 21:12:22 +0100 Subject: [PATCH 16/25] Information about releasing for other platforms --- doc/maintainers/releases.md | 140 +++++++++++++++++++++++++++++++++--- 1 file changed, 131 insertions(+), 9 deletions(-) diff --git a/doc/maintainers/releases.md b/doc/maintainers/releases.md index 1967a05152..66d1fef164 100644 --- a/doc/maintainers/releases.md +++ b/doc/maintainers/releases.md @@ -280,7 +280,68 @@ final release. Publish the GitHub release. - ### D: Update versions and `ChangeLog.md` for 'unreleased' + ### D: Consider adding other platforms to the GitHub release + + The + [Integration Tests workflow](https://github.com/commercialhaskell/stack/actions?query=workflow%3A%22Integration+tests%22) + is limited to the platforms supported by the GitHub-hosted runners + (currently, only x86_64) and any self-hosted runners (currently, only + Linux/AArch64). However, it is possible to edit the GitHub release to + include binary distributions for other platforms (for example, + macOS/AArch64). The prerequisites are: + + * a computer with that platform (operating system, machine architecture); + * a sufficiently-recent existing version of Stack for that platform (for + example, GHCup has published versions of Stack for macOS/AArch64); + * a tool to print SHA checksums, such as `shasum` on Linux and macOS; and + * the GNU Privacy Guard tool (`gpg`), which has had imported the private key + used to sign Stack executables (see further below). + + The steps are similar to those in the workflow: + + 1. Change to the root directory of the Stack project. + + 2. `stack etc/scripts/release.hs check`, to check before building. + + 3. `stack etc/scripts/release.hs build`, to build. The output 'assets' + (`stack--- ...`) will be in + the `_release` directory in the root directory of the Stack project. + + 4. For each of the output assets, create a corresponding SHA 256 file with + a `.sha256` extension. For example (where `` is the name of the + file): + + ~~~text + shasum -a 256 > .sha256 + ~~~ + + 5. For each of the output assets, create a corresponding ASCII-armored + signature file with an `.asc` extension using `gpg`. For example (where + `` is the name of the file): + + ~~~text + gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 + ~~~ + + 6. Edit the GitHub release to include the output assets and their + corresponding `.sha256` and `.asc` files. + + The private key used to sign Stack executables can be exported from a + version of `gpg` to which it has previously been imported with: + + ~~~text + gpg --armor --export-secret-key 0x575159689BEFB442 + ~~~ + + The private key, so obtained, can be imported into `gpg` by: + + 1. Commanding `gpg --import`. + + 2. Pasting the private key. + + 3. Entering Ctrl+D and Enter. + + ### E: Update versions and `ChangeLog.md` for 'unreleased' In the `rc/vX.Y` branch: @@ -311,7 +372,7 @@ final release. Bug fixes: ~~~ - ### E: Announce the release candidate + ### F: Announce the release candidate Announce the release candidate to the following mailing lists @@ -408,7 +469,68 @@ final release. Publish the GitHub release. - ### D: Upload to Hackage and reset branches + ### D: Consider adding other platforms to the GitHub release + + The + [Integration Tests workflow](https://github.com/commercialhaskell/stack/actions?query=workflow%3A%22Integration+tests%22) + is limited to the platforms supported by the GitHub-hosted runners + (currently, only x86_64) and any self-hosted runners (currently, only + Linux/AArch64). However, it is possible to edit the GitHub release to + include binary distributions for other platforms (for example, + macOS/AArch64). The prerequisites are: + + * a computer with that platform (operating system, machine architecture); + * a sufficiently-recent existing version of Stack for that platform (for + example, GHCup has published versions of Stack for macOS/AArch64); + * a tool to print SHA checksums, such as `shasum` on Linux and macOS; and + * the GNU Privacy Guard tool (`gpg`), which has had imported the private key + used to sign Stack executables (see further below). + + The steps are similar to those in the workflow: + + 1. Change to the root directory of the Stack project. + + 2. `stack etc/scripts/release.hs check`, to check before building. + + 3. `stack etc/scripts/release.hs build`, to build. The output 'assets' + (`stack--- ...`) will be in + the `_release` directory in the root directory of the Stack project. + + 4. For each of the output assets, create a corresponding SHA 256 file with + a `.sha256` extension. For example (where `` is the name of the + file): + + ~~~text + shasum -a 256 > .sha256 + ~~~ + + 5. For each of the output assets, create a corresponding ASCII-armored + signature file with an `.asc` extension using `gpg`. For example (where + `` is the name of the file): + + ~~~text + gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 + ~~~ + + 6. Edit the GitHub release to include the output assets and their + corresponding `.sha256` and `.asc` files. + + The private key used to sign Stack executables can be exported from a + version of `gpg` to which it has previously been imported with: + + ~~~text + gpg --armor --export-secret-key 0x575159689BEFB442 + ~~~ + + The private key, so obtained, can be imported into `gpg` by: + + 1. Commanding `gpg --import`. + + 2. Pasting the private key. + + 3. Entering Ctrl+D and Enter. + + ### E: Upload to Hackage and reset branches Upload the `stack` package to Hackage with the command: @@ -448,14 +570,14 @@ final release. git push origin :rc/vX.Y ~~~ - ### E: Activate the version on Read The Docs + ### F: Activate the version on Read The Docs Activate the version for new release tag, on [readthedocs.org](https://readthedocs.org/projects/stack/versions/). Ensure that the `stable` documentation has updated. - ### F: Update get.haskellstack.org redirects + ### G: Update get.haskellstack.org redirects Update the https://get.haskellstack.org redirects by updating the `_redirects` file in the root of the @@ -484,7 +606,7 @@ final release. and make sure it redirects to the new version. - ### G: Update versions and `ChangeLog.md` for 'unreleased' + ### H: Update versions and `ChangeLog.md` for 'unreleased' In the `stable` branch: @@ -515,12 +637,12 @@ final release. Bug fixes: ~~~ - ### H: Update the repository's issue and pull request templates + ### I: Update the repository's issue and pull request templates The repository's issue and pull request templates are the `.github` directory. Update them to refer to the new release version (`X.Y.Z`). - ### I: Announce the release + ### J: Announce the release Announce the release to the following mailing lists @@ -562,7 +684,7 @@ final release. * the release description from Github. - ### J: Update Docker images + ### K: Update Docker images Docker Hub includes Docker images under [`fpco/stack-build'](https://hub.docker.com/r/fpco/stack-build). From 921f62bfd55443a909d4b6d4d20d7ebd7ad8ed0a Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 24 Sep 2023 22:16:49 +0100 Subject: [PATCH 17/25] Bump to Stackage LTS Haskell 21.13 --- cabal.project | 2 +- doc/GUIDE.md | 12 +++++----- doc/Stack_and_VS_Code.md | 2 +- doc/custom_snapshot.md | 22 +++++++++---------- doc/faq.md | 6 ++--- doc/list_command.md | 6 ++--- doc/script_command.md | 4 ++-- doc/scripts.md | 20 ++++++++--------- doc/stack_yaml_vs_cabal_package_file.md | 4 ++-- doc/yaml_configuration.md | 6 ++--- etc/scripts/build-stack-installer.hs | 2 +- etc/scripts/release.hs | 4 ++-- src/Stack/Init.hs | 4 ++-- stack-ghc-9.6.2.yaml | 5 +---- stack-ghc-9.6.2.yaml.lock | 17 +++++--------- stack.yaml | 5 ++--- stack.yaml.lock | 15 ++++--------- tests/integration/lib/StackTest.hs | 2 +- .../files/snapshot-modify-lts.yaml | 2 +- .../files/snapshots/local-snapshot.yaml | 2 +- .../files/snapshots/remote-snapshot.yaml | 2 +- .../1337-unicode-everywhere/files/stack.yaml | 2 +- .../1659-skip-component/files/stack.yaml | 2 +- .../1884-url-to-tarball/files/stack.yaml | 2 +- .../tests/2195-depend-on-exe/files/stack.yaml | 2 +- .../tests/32-unlisted-module/files/stack.yaml | 2 +- .../3315-multi-ghc-options/files/stack.yaml | 2 +- .../335-multi-package-flags/files/stack.yaml | 2 +- .../345-override-bytestring/files/stack.yaml | 2 +- .../files/orig-stack.yaml | 2 +- .../3591-cabal-warnings-once/files/stack.yaml | 2 +- .../365-invalid-success/files/stack.yaml | 2 +- .../tests/366-non-root-dir/files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../tests/3863-purge-command/files/stack.yaml | 2 +- .../files/no-base-upgrade.yaml | 2 +- .../files/unattainable-base.yaml | 2 +- .../files/test-stack.yml | 2 +- .../3959-order-of-flags/files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../4101-dependency-tree/files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../tests/4270-files-order/files/stack.yaml | 2 +- .../tests/4453-detailed/files/stack.yaml | 2 +- .../4783-doctest-deps/files/snapshot.yaml | 2 +- .../4897-boot-package-pruned/files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../tests/5180-ghc-rts-flags/files/stack.yaml | 2 +- .../files/package-a/stack.yaml | 2 +- .../files/package-b/stack.yaml | 2 +- .../files/package-c/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../tests/620-env-command/files/run.sh | 4 ++-- .../tests/717-sdist-test/files/stack.yaml | 2 +- .../763-buildable-false/files/stack.yaml | 2 +- .../files/stack.yaml | 2 +- .../tests/cabal-non-buildable-bug/Main.hs | 2 +- .../files/stack.yaml | 2 +- .../tests/drop-packages/files/stack.yaml | 2 +- .../duplicate-package-ids/files/stack1.yaml | 2 +- .../duplicate-package-ids/files/stack2.yaml | 2 +- .../tests/haddock-options/files/stack.yaml | 2 +- .../tests/hpack-repo/files/stack.yaml | 2 +- .../tests/init-omit-packages/Main.hs | 4 ++-- .../tests/lock-files/files/stack-1-extra | 2 +- .../tests/lock-files/files/stack-2-extras | 2 +- .../files/stack.yaml | 2 +- .../tests/multi-test/files/stack.yaml | 2 +- .../tests/mutable-deps/files/stack.yaml | 2 +- .../tests/nice-resolver-names/Main.hs | 2 +- .../integration/tests/upload/files/stack.yaml | 2 +- .../tests/watched-files/files/stack.yaml | 2 +- 74 files changed, 118 insertions(+), 136 deletions(-) diff --git a/cabal.project b/cabal.project index 6eefa92bbd..0daeaf62f9 100644 --- a/cabal.project +++ b/cabal.project @@ -33,7 +33,7 @@ -- specified by the snapshot specifed in Stack's project-level YAML -- configuration file (`stack.yaml`). The relevant version of GHC can be -- confirmed by reviewing the snapshot on Stackage. For example, at: --- https://www.stackage.org/lts-21.12/cabal.config. +-- https://www.stackage.org/lts-21.13/cabal.config. -- with-compiler: ghc-9.4.7 import: cabal.config diff --git a/doc/GUIDE.md b/doc/GUIDE.md index 4277d8a165..46542a0c48 100644 --- a/doc/GUIDE.md +++ b/doc/GUIDE.md @@ -255,7 +255,7 @@ packages: The value of the `resolver` key tells Stack *how* to build your package: which GHC version to use, versions of package dependencies, and so on. Our value here -says to use [LTS Haskell 21.12](https://www.stackage.org/lts-21.12), which +says to use [LTS Haskell 21.13](https://www.stackage.org/lts-21.13), which implies GHC 9.4.7 (which is why `stack build` installs that version of GHC if it is not already available to Stack). There are a number of values you can use for `resolver`, which we'll cover later. @@ -503,7 +503,7 @@ also known as *snapshots*. We mentioned the LTS resolvers, and you can get quite a bit of information about it at [https://www.stackage.org/lts](https://www.stackage.org/lts), including: -* The appropriate resolver value (`resolver: lts-21.12`, as is currently the +* The appropriate resolver value (`resolver: lts-21.13`, as is currently the latest LTS) * The GHC version used * A full list of all packages available in this snapshot @@ -522,16 +522,16 @@ towards by default as well). ## Resolvers and changing your compiler version -Let's explore package sets a bit further. Instead of `lts-21.12`, let's change +Let's explore package sets a bit further. Instead of `lts-21.13`, let's change our `stack.yaml` file to use the [latest nightly](https://www.stackage.org/nightly). Right now, this is currently -2023-09-16 - please see the resolver from the link above to get the latest. +2023-09-24 - please see the resolver from the link above to get the latest. Then, commanding `stack build` again will produce: ~~~text stack build -# Downloaded nightly-2023-09-16 build plan. +# Downloaded nightly-2023-09-24 build plan. # build output ... ~~~ @@ -1340,7 +1340,7 @@ yields output like: ~~~text Run from outside a project, using implicit global project config -Using latest snapshot resolver: lts-21.12 +Using latest snapshot resolver: lts-21.13 Writing global (non-project-specific) config file to: /home/michael/.stack/global/stack.yaml Note: You can change the snapshot via the resolver field there. I installed the stm package via --package stm diff --git a/doc/Stack_and_VS_Code.md b/doc/Stack_and_VS_Code.md index ce8ba79105..4904e313b0 100644 --- a/doc/Stack_and_VS_Code.md +++ b/doc/Stack_and_VS_Code.md @@ -75,7 +75,7 @@ enabled). For further information about these options, see the `install-ghc` For this workaround to work, each time that a resolver is used that references a different version of GHC, then GHCup must be used to install it (if GHCup has -not already installed that version). For example, to use `resolver: lts-21.12` +not already installed that version). For example, to use `resolver: lts-21.13` (GHC 9.4.7), the command `ghcup install ghc 9.4.7` must have been used to install GHC 9.4.7. That may be a minor inconvenience for some people, as one the primary benefits of Stack over other Haskell build tools has been that Stack diff --git a/doc/custom_snapshot.md b/doc/custom_snapshot.md index f48e4b746a..f7d0d30029 100644 --- a/doc/custom_snapshot.md +++ b/doc/custom_snapshot.md @@ -17,7 +17,7 @@ available in snapshots to ensure reproducibility. snapshot specification. ~~~yaml -resolver: lts-21.12 # Inherits GHC version and package set +resolver: lts-21.13 # Inherits GHC version and package set compiler: ghc-9.6.2 # Overwrites GHC version in the resolver, optional # Additional packages, follows extra-deps syntax @@ -61,35 +61,35 @@ custom snapshot, due to Stack sharing snapshot packages whenever possible. ### Overriding the compiler -The following snapshot specification will be identical to `lts-21.12`, but +The following snapshot specification will be identical to `lts-21.13`, but instead use `ghc-9.4.5` instead of `ghc-9.4.7`: ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 compiler: ghc-9.4.5 ~~~ ### Dropping packages -The following snapshot specification will be identical to `lts-21.12`, but +The following snapshot specification will be identical to `lts-21.13`, but without the `text` package in our snapshot. Removing this package will cause all the packages that depend on `text` to be unbuildable, but they will still be present in the snapshot. ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 drop-packages: - text ~~~ ### Hiding packages -The following snapshot specification will be identical to `lts-21.12`, but the +The following snapshot specification will be identical to `lts-21.13`, but the `text` package will be hidden when registering. This will affect, for example, the import parser in the script command. ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 hidden: - text ~~~ @@ -99,11 +99,11 @@ hidden: In order to specify GHC options for a package, you use the same syntax as the [ghc-options](yaml_configuration.md#ghc-options) key for build configuration. -The following snapshot specification will be identical to `lts-21.12`, but +The following snapshot specification will be identical to `lts-21.13`, but provides `-O1` as a ghc-option for `text`: ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 packages: - text-2.0.2 ghc-options: @@ -122,11 +122,11 @@ packages in the `packages` list, rather than all packages in the snapshot. In order to specify Cabal flags for a package, you use the same syntax as the [flags](yaml_configuration.md#flags) key for build configuration. The -following snapshot specification will be identical to `lts-21.12`, but +following snapshot specification will be identical to `lts-21.13`, but it enables the `developer` Cabal flag: ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 packages: - text-2.0.2 flags: diff --git a/doc/faq.md b/doc/faq.md index 69d8db6505..bd85093f05 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -9,7 +9,7 @@ here is to be as helpful and concise as possible. ## What version of GHC is used when I run something like `stack ghci`? The version of GHC, as well as which packages can be installed, are specified by -the _resolver_. This may be something like `lts-21.12`, which is from +the _resolver_. This may be something like `lts-21.13`, which is from [Stackage](https://www.stackage.org/). The [user's guide](GUIDE.md) discusses the resolver in more detail. @@ -76,7 +76,7 @@ You can make tweaks to a snapshot by modifying the `extra-deps` configuration value in your `stack.yaml` file, e.g.: ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 packages: - . extra-deps: @@ -91,7 +91,7 @@ Add it to the directory where your `stack.yaml` file lives, e.g. ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 packages: - . extra-deps: diff --git a/doc/list_command.md b/doc/list_command.md index b84b3bb8d2..dd69435404 100644 --- a/doc/list_command.md +++ b/doc/list_command.md @@ -44,17 +44,17 @@ Error: [S-4926] pantry, pretty, pasty, xattr, alloy, para, pappy, alure, polar and factory. -stack --resolver lts-21.12 list base unix Win32 acme-missiles pantry +stack --resolver lts-21.13 list base unix Win32 acme-missiles pantry Error: [S-4926] * Package does not appear in snapshot: base. * Package does not appear in snapshot: unix. * Package does not appear in snapshot: Win32. * Package does not appear in snapshot: acme-missiles. -stack --resolver lts-21.12 list pantry +stack --resolver lts-21.13 list pantry pantry-0.8.3 -stack --resolver lts-21.12 list +stack --resolver lts-21.13 list AC-Angle-1.0 ALUT-2.4.0.3 ... diff --git a/doc/script_command.md b/doc/script_command.md index 77b219224b..849e2dc244 100644 --- a/doc/script_command.md +++ b/doc/script_command.md @@ -18,7 +18,7 @@ configuration files (global and project-level). A snapshot must be specified on the command line (with the `--resolver` option). For example: ~~~text -stack script --resolver lts-21.12 MyScript.hs +stack script --resolver lts-21.13 MyScript.hs ~~~ The `stack script` command behaves as if the `--install-ghc` flag had been @@ -100,7 +100,7 @@ main = do can be compiled and run, with arguments, with: ~~~text -stack --resolver lts-21.12 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!" +stack --resolver lts-21.13 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!" ~~~ All the compilation outputs (like `Main.hi`, `Main.o`, and the executable diff --git a/doc/scripts.md b/doc/scripts.md index 5b0d17c26a..852674e9ae 100644 --- a/doc/scripts.md +++ b/doc/scripts.md @@ -19,7 +19,7 @@ An example will be easiest to understand. Consider the Haskell source file ~~~haskell #!/usr/bin/env stack --- stack script --resolver lts-21.12 --package turtle +-- stack script --resolver lts-21.13 --package turtle {-# LANGUAGE OverloadedStrings #-} import Turtle (echo) main = echo "Hello World!" @@ -78,10 +78,10 @@ able to reuse everything already built). The second line of the source code is the Stack interpreter options comment. In this example, it specifies the `stack script` command with the options of a -LTS Haskell 21.12 snapshot (`--resolver lts-21.12`) and ensuring the +LTS Haskell 21.13 snapshot (`--resolver lts-21.13`) and ensuring the [`turtle` package](https://hackage.haskell.org/package/turtle) is available (`--package turtle`). The version of the package will be that in the specified -snapshot (`lts-21.12` provides `turtle-1.6.1`). +snapshot (`lts-21.13` provides `turtle-1.6.1`). ## Arguments and interpreter options and arguments @@ -116,7 +116,7 @@ For example, the command `stack MyScript.hs arg1 arg2` with `MyScript.hs`: ~~~haskell #!/usr/bin/env stack {- stack script - --resolver lts-21.12 + --resolver lts-21.13 -- +RTS -s -RTS -} @@ -132,7 +132,7 @@ main = do is equivalent to the following command at the command line: ~~~text -stack script --resolver lts-21.12 -- MyScript.hs arg1 arg2 +RTS -s -RTS +stack script --resolver lts-21.13 -- MyScript.hs arg1 arg2 +RTS -s -RTS ~~~ where `+RTS -s -RTS` are some of GHC's @@ -161,7 +161,7 @@ space separated list. For example: ~~~haskell #!/usr/bin/env stack {- stack script - --resolver lts-21.12 + --resolver lts-21.13 --package turtle --package "stm async" --package http-client,http-conduit @@ -191,7 +191,7 @@ which makes use of the joke package ~~~haskell {- stack script - --resolver lts-21.12 + --resolver lts-21.13 --package acme-missiles -} import Acme.Missiles (launchMissiles) @@ -202,7 +202,7 @@ main = launchMissiles The command `stack --script-no-run-compile Script.hs` then behaves as if the command -`stack script --resolver lts-21.12 --package acme-missiles --no-run --compile -- Script.hs` +`stack script --resolver lts-21.13 --package acme-missiles --no-run --compile -- Script.hs` had been given. `Script.hs` is compiled (without optimisation) and the resulting executable is not run: no missiles are launched in the process! @@ -239,7 +239,7 @@ example with `runghc`: {- stack runghc --install-ghc - --resolver lts-21.12 + --resolver lts-21.13 --package base --package turtle -- @@ -262,7 +262,7 @@ it. Here is an example: {- stack exec ghci --install-ghc - --resolver lts-21.12 + --resolver lts-21.13 --package turtle -} ~~~ diff --git a/doc/stack_yaml_vs_cabal_package_file.md b/doc/stack_yaml_vs_cabal_package_file.md index 29fdc9444e..8de582e33b 100644 --- a/doc/stack_yaml_vs_cabal_package_file.md +++ b/doc/stack_yaml_vs_cabal_package_file.md @@ -64,8 +64,8 @@ requires that you have chosen a specific version for each package available. The most common means by which this set of packages is defined is via a snapshot provided by Stackage. For example, if you go to the page -, you will see a list of 3,010 packages at -specific version numbers. When you then specify `resolver: lts-21.12`, you're +, you will see a list of 3,010 packages at +specific version numbers. When you then specify `resolver: lts-21.13`, you're telling Stack to use those package versions in resolving dependencies down to specific versions of packages. diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 8f223ae64f..89fec5e100 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -98,8 +98,8 @@ installation, and various settings like build flags. It is called a resolver since a snapshot states how dependencies are resolved. There are currently four resolver types: -* LTS Haskell snapshots, e.g. `resolver: lts-21.12` -* Stackage Nightly snapshots, e.g. `resolver: nightly-2023-09-16` +* LTS Haskell snapshots, e.g. `resolver: lts-21.13` +* Stackage Nightly snapshots, e.g. `resolver: nightly-2023-09-24` * No snapshot, just use packages shipped with the compiler. For GHC this looks like `resolver: ghc-9.6.2` * Custom snapshot, via a URL or relative file path. For further information, see @@ -536,7 +536,7 @@ resolvers like `ghc-9.6.2`. This can be used to override the compiler for a Stackage snapshot, like this: ~~~yaml -resolver: lts-21.12 +resolver: lts-21.13 compiler: ghc-9.6.2 compiler-check: match-exact ~~~ diff --git a/etc/scripts/build-stack-installer.hs b/etc/scripts/build-stack-installer.hs index 922f9aa14e..cd31e55cb2 100644 --- a/etc/scripts/build-stack-installer.hs +++ b/etc/scripts/build-stack-installer.hs @@ -1,5 +1,5 @@ {- stack script - --resolver lts-21.12 + --resolver lts-21.13 --install-ghc --package nsis -} diff --git a/etc/scripts/release.hs b/etc/scripts/release.hs index af82418048..df011f5eb8 100644 --- a/etc/scripts/release.hs +++ b/etc/scripts/release.hs @@ -1,5 +1,5 @@ {- stack script - --resolver lts-21.12 + --resolver lts-21.13 --ghc-options -Wall -} @@ -7,7 +7,7 @@ -- interpreter options comment, Stack deduces the required packages from the -- module imports, being: Cabal, base, bytestring, directory, extra, process, -- shake, tar, zip-archive and zlib. These are either GHC boot packages or in --- the snapshot. Stackage LTS Haskell 21.12 does not include boot packages +-- the snapshot. Stackage LTS Haskell 21.13 does not include boot packages -- directly. As GHC 9.4.7 boot packages Cabal and Cabal-syntax expose modules -- with the same names, the language extension PackageImports is required. diff --git a/src/Stack/Init.hs b/src/Stack/Init.hs index be4f1cb0fb..1245ff15cf 100644 --- a/src/Stack/Init.hs +++ b/src/Stack/Init.hs @@ -421,8 +421,8 @@ renderStackYaml p ignoredPackages dupPackages = , "A snapshot resolver dictates the compiler version and the set of packages" , "to be used for project dependencies. For example:" , "" - , "resolver: lts-21.12" - , "resolver: nightly-2023-09-16" + , "resolver: lts-21.13" + , "resolver: nightly-2023-09-24" , "resolver: ghc-9.6.2" , "" , "The location of a snapshot can be provided as a file or url. Stack assumes" diff --git a/stack-ghc-9.6.2.yaml b/stack-ghc-9.6.2.yaml index 18cc47f8cd..951ca2932c 100644 --- a/stack-ghc-9.6.2.yaml +++ b/stack-ghc-9.6.2.yaml @@ -2,10 +2,7 @@ # built with GHC 9.6.2. # GHC 9.6.2 -resolver: nightly-2023-09-22 - -extra-deps: -- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 +resolver: nightly-2023-09-24 docker: enable: false diff --git a/stack-ghc-9.6.2.yaml.lock b/stack-ghc-9.6.2.yaml.lock index 49c8f31b23..5524857641 100644 --- a/stack-ghc-9.6.2.yaml.lock +++ b/stack-ghc-9.6.2.yaml.lock @@ -3,17 +3,10 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: -- completed: - hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - pantry-tree: - sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee - size: 779 - original: - hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 +packages: [] snapshots: - completed: - sha256: 93137bc0122de394fa2c43e933971b2996cd7dc600989b721ad971810b9a2f3f - size: 669537 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/9/22.yaml - original: nightly-2023-09-22 + sha256: b7a0a7e0137557ae2caa9d4f20fcca1f8b190e5098a5d54e6c5166b3e88856a5 + size: 669538 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/9/24.yaml + original: nightly-2023-09-24 diff --git a/stack.yaml b/stack.yaml index 550abd0aef..288b0963ea 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 # GHC 9.4.7 +resolver: lts-21.13 # GHC 9.4.7 extra-deps: - aeson-warning-parser-0.1.0@sha256:f2c1c42b73aa35d352060abcbb867c410cbbf57d0cb0fed607bcd1e2a74954ad,1308 @@ -13,14 +13,13 @@ extra-deps: - crypton-x509-store-1.6.9@sha256:422b9b9f87a7382c66385d047615b16fc86a68c08ea22b1e0117c143a2d44050,1750 - crypton-x509-system-1.6.7@sha256:023ed573d82983bc473a37a89e0434a085b413be9f68d07e085361056afd4637,1532 - crypton-x509-validation-1.6.12@sha256:85989721b64be4b90de9f66ef641c26f57575cffed1a50d707065fb60176f386,2227 -# lts-21.12 specifies hpack-0.35.2 +# lts-21.13 specifies hpack-0.35.2 - hpack-0.36.0@sha256:c2daa6556afc57367a5d1dbd878bf515d442d201e24b27473051359abd47ed08,5187 - http-client-tls-0.3.6.3@sha256:a5909ce412ee65c141b8547f8fe22236f175186c95c708e86a46b5547394f910,2046 - http-download-0.2.1.0@sha256:a97863e96f7d44efc3d0e3061db7fe2540b8374ca44ae90d0b56040140cb7506,1716 - optparse-applicative-0.18.1.0@sha256:b4cf8d9018e5e67cb1f14edb5130b6d05ad8bc1b5f6bd4efaa6ec0b7f28f559d,5132 - optparse-generic-1.5.1@sha256:c65a7d3429feedf870f5a9f7f0d2aaf75609888b52449f85f22871b5f5a7e95f,2204 - pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650 -- rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627 - tar-conduit-0.4.0@sha256:f333649770f5ec42a83a93b0d424cf6bb895d80dfbee05a54340395f81d036ae,3126 - tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571 diff --git a/stack.yaml.lock b/stack.yaml.lock index 917be59e96..01e3dcbcf9 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -116,13 +116,6 @@ packages: size: 2665 original: hackage: pantry-0.9.2@sha256:e1c5444d1b4003435d860853abd21e91e5fc337f2b2e2c8c992a2bac04712dc0,7650 -- completed: - hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - pantry-tree: - sha256: 5d18c4b8e4a0a959ab3e8544ea1baae1674ebbe01f379a2a75215c05f7d255ee - size: 779 - original: - hackage: rio-prettyprint-0.1.7.0@sha256:4f0f2dabcbc3be1f9871de7c2ff3d090b82462ca5924afa24f7b2540c5511d84,1428 - completed: hackage: static-bytes-0.1.0@sha256:35dbf30f617baa0151682c97687042516be07872a39984f9fe31f78125b962bf,1627 pantry-tree: @@ -146,7 +139,7 @@ packages: hackage: tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571 snapshots: - completed: - sha256: 9313df78f49519315342f4c51ffc5da12659d3735f8ac3c54a1fb98ff874474e - size: 640036 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/12.yaml - original: lts-21.12 + sha256: 8017c7970c2a8a9510c60cc70ac245d59e0c34eb932b91d37af09fe59855d854 + size: 640038 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/13.yaml + original: lts-21.13 diff --git a/tests/integration/lib/StackTest.hs b/tests/integration/lib/StackTest.hs index fd065ad6bf..9c21a25fbc 100644 --- a/tests/integration/lib/StackTest.hs +++ b/tests/integration/lib/StackTest.hs @@ -363,7 +363,7 @@ isMacOSX = os == "darwin" -- the main @stack.yaml@. -- defaultResolverArg :: String -defaultResolverArg = "--resolver=lts-21.12" +defaultResolverArg = "--resolver=lts-21.13" -- | Remove a file and ignore any warnings about missing files. removeFileIgnore :: HasCallStack => FilePath -> IO () diff --git a/tests/integration/tests/1265-extensible-snapshots/files/snapshot-modify-lts.yaml b/tests/integration/tests/1265-extensible-snapshots/files/snapshot-modify-lts.yaml index 5ece4c8e5d..855a5d4343 100644 --- a/tests/integration/tests/1265-extensible-snapshots/files/snapshot-modify-lts.yaml +++ b/tests/integration/tests/1265-extensible-snapshots/files/snapshot-modify-lts.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 name: snapshot-modify-lts drop-packages: - zlib diff --git a/tests/integration/tests/1265-extensible-snapshots/files/snapshots/local-snapshot.yaml b/tests/integration/tests/1265-extensible-snapshots/files/snapshots/local-snapshot.yaml index 4e25b6daa9..271a24fe40 100644 --- a/tests/integration/tests/1265-extensible-snapshots/files/snapshots/local-snapshot.yaml +++ b/tests/integration/tests/1265-extensible-snapshots/files/snapshots/local-snapshot.yaml @@ -1,5 +1,5 @@ --- -resolver: lts-21.12 +resolver: lts-21.13 name: local-snapshot packages: - archive: package-0.1.2.3.tar.gz diff --git a/tests/integration/tests/1265-extensible-snapshots/files/snapshots/remote-snapshot.yaml b/tests/integration/tests/1265-extensible-snapshots/files/snapshots/remote-snapshot.yaml index e9ea252002..4908bf7e49 100644 --- a/tests/integration/tests/1265-extensible-snapshots/files/snapshots/remote-snapshot.yaml +++ b/tests/integration/tests/1265-extensible-snapshots/files/snapshots/remote-snapshot.yaml @@ -1,5 +1,5 @@ --- -resolver: lts-21.12 +resolver: lts-21.13 name: remote-snapshot packages: - archive: https://s3.amazonaws.com/hackage.fpcomplete.com/package/acme-missiles-0.3.tar.gz diff --git a/tests/integration/tests/1337-unicode-everywhere/files/stack.yaml b/tests/integration/tests/1337-unicode-everywhere/files/stack.yaml index 6b71e0fe35..6c19768deb 100644 --- a/tests/integration/tests/1337-unicode-everywhere/files/stack.yaml +++ b/tests/integration/tests/1337-unicode-everywhere/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - '.' extra-deps: [] diff --git a/tests/integration/tests/1659-skip-component/files/stack.yaml b/tests/integration/tests/1659-skip-component/files/stack.yaml index 6b71e0fe35..6c19768deb 100644 --- a/tests/integration/tests/1659-skip-component/files/stack.yaml +++ b/tests/integration/tests/1659-skip-component/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - '.' extra-deps: [] diff --git a/tests/integration/tests/1884-url-to-tarball/files/stack.yaml b/tests/integration/tests/1884-url-to-tarball/files/stack.yaml index b0a227e965..bc2997a944 100644 --- a/tests/integration/tests/1884-url-to-tarball/files/stack.yaml +++ b/tests/integration/tests/1884-url-to-tarball/files/stack.yaml @@ -2,4 +2,4 @@ extra-deps: - location: https://hackage.haskell.org/package/half-0.2.2.3/half-0.2.2.3.tar.gz sha256: 85c244c80d1c889a3d79073a6f5a99d9e769dbe3c574ca11d992b2b4f7599a5c size: 6050 -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/2195-depend-on-exe/files/stack.yaml b/tests/integration/tests/2195-depend-on-exe/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/2195-depend-on-exe/files/stack.yaml +++ b/tests/integration/tests/2195-depend-on-exe/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/32-unlisted-module/files/stack.yaml b/tests/integration/tests/32-unlisted-module/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/32-unlisted-module/files/stack.yaml +++ b/tests/integration/tests/32-unlisted-module/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3315-multi-ghc-options/files/stack.yaml b/tests/integration/tests/3315-multi-ghc-options/files/stack.yaml index 3a1ee17704..8acfc658f9 100644 --- a/tests/integration/tests/3315-multi-ghc-options/files/stack.yaml +++ b/tests/integration/tests/3315-multi-ghc-options/files/stack.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - '.' diff --git a/tests/integration/tests/335-multi-package-flags/files/stack.yaml b/tests/integration/tests/335-multi-package-flags/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/335-multi-package-flags/files/stack.yaml +++ b/tests/integration/tests/335-multi-package-flags/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/345-override-bytestring/files/stack.yaml b/tests/integration/tests/345-override-bytestring/files/stack.yaml index f2dc4a93b3..bbbb20eac5 100644 --- a/tests/integration/tests/345-override-bytestring/files/stack.yaml +++ b/tests/integration/tests/345-override-bytestring/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: - bytestring-0.11.3.1 - binary-0.8.9.0 diff --git a/tests/integration/tests/3533-extra-deps-solver/files/orig-stack.yaml b/tests/integration/tests/3533-extra-deps-solver/files/orig-stack.yaml index 6badefe54e..61d579ff77 100644 --- a/tests/integration/tests/3533-extra-deps-solver/files/orig-stack.yaml +++ b/tests/integration/tests/3533-extra-deps-solver/files/orig-stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - ./local-mmorph diff --git a/tests/integration/tests/3591-cabal-warnings-once/files/stack.yaml b/tests/integration/tests/3591-cabal-warnings-once/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/3591-cabal-warnings-once/files/stack.yaml +++ b/tests/integration/tests/3591-cabal-warnings-once/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/365-invalid-success/files/stack.yaml b/tests/integration/tests/365-invalid-success/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/365-invalid-success/files/stack.yaml +++ b/tests/integration/tests/365-invalid-success/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/366-non-root-dir/files/stack.yaml b/tests/integration/tests/366-non-root-dir/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/366-non-root-dir/files/stack.yaml +++ b/tests/integration/tests/366-non-root-dir/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3787-internal-libs-with-no-main-lib/files/stack.yaml b/tests/integration/tests/3787-internal-libs-with-no-main-lib/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/3787-internal-libs-with-no-main-lib/files/stack.yaml +++ b/tests/integration/tests/3787-internal-libs-with-no-main-lib/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3863-purge-command/files/stack.yaml b/tests/integration/tests/3863-purge-command/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/3863-purge-command/files/stack.yaml +++ b/tests/integration/tests/3863-purge-command/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3940-base-upgrade-warning/files/no-base-upgrade.yaml b/tests/integration/tests/3940-base-upgrade-warning/files/no-base-upgrade.yaml index 0148ec5761..a0005518d4 100644 --- a/tests/integration/tests/3940-base-upgrade-warning/files/no-base-upgrade.yaml +++ b/tests/integration/tests/3940-base-upgrade-warning/files/no-base-upgrade.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: - base-4.10.1.0 diff --git a/tests/integration/tests/3940-base-upgrade-warning/files/unattainable-base.yaml b/tests/integration/tests/3940-base-upgrade-warning/files/unattainable-base.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/3940-base-upgrade-warning/files/unattainable-base.yaml +++ b/tests/integration/tests/3940-base-upgrade-warning/files/unattainable-base.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3942-solver-error-output/files/test-stack.yml b/tests/integration/tests/3942-solver-error-output/files/test-stack.yml index ea19302f37..ee51599c1a 100644 --- a/tests/integration/tests/3942-solver-error-output/files/test-stack.yml +++ b/tests/integration/tests/3942-solver-error-output/files/test-stack.yml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: [] diff --git a/tests/integration/tests/3959-order-of-flags/files/stack.yaml b/tests/integration/tests/3959-order-of-flags/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/3959-order-of-flags/files/stack.yaml +++ b/tests/integration/tests/3959-order-of-flags/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/397-case-insensitive-flags/files/stack.yaml b/tests/integration/tests/397-case-insensitive-flags/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/397-case-insensitive-flags/files/stack.yaml +++ b/tests/integration/tests/397-case-insensitive-flags/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/3997-coverage-with-cabal-3/files/stack.yaml b/tests/integration/tests/3997-coverage-with-cabal-3/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/3997-coverage-with-cabal-3/files/stack.yaml +++ b/tests/integration/tests/3997-coverage-with-cabal-3/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/4101-dependency-tree/files/stack.yaml b/tests/integration/tests/4101-dependency-tree/files/stack.yaml index 6d2b91d6a7..40e07889d6 100644 --- a/tests/integration/tests/4101-dependency-tree/files/stack.yaml +++ b/tests/integration/tests/4101-dependency-tree/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . - subproject diff --git a/tests/integration/tests/4105-test-coverage-of-internal-lib/files/stack.yaml b/tests/integration/tests/4105-test-coverage-of-internal-lib/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/4105-test-coverage-of-internal-lib/files/stack.yaml +++ b/tests/integration/tests/4105-test-coverage-of-internal-lib/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/4270-files-order/files/stack.yaml b/tests/integration/tests/4270-files-order/files/stack.yaml index 9a8f2a3aef..c7e4783a53 100644 --- a/tests/integration/tests/4270-files-order/files/stack.yaml +++ b/tests/integration/tests/4270-files-order/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . diff --git a/tests/integration/tests/4453-detailed/files/stack.yaml b/tests/integration/tests/4453-detailed/files/stack.yaml index 3a1ee17704..8acfc658f9 100644 --- a/tests/integration/tests/4453-detailed/files/stack.yaml +++ b/tests/integration/tests/4453-detailed/files/stack.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - '.' diff --git a/tests/integration/tests/4783-doctest-deps/files/snapshot.yaml b/tests/integration/tests/4783-doctest-deps/files/snapshot.yaml index 4d42f6163e..e94b847fc1 100644 --- a/tests/integration/tests/4783-doctest-deps/files/snapshot.yaml +++ b/tests/integration/tests/4783-doctest-deps/files/snapshot.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 name: foo packages: - acme-dont-1.1@sha256:8264ad3e5113d3e0417b46e71d5a9c0914a1f03b5b81319cc329f1dc0f49b96c,602 diff --git a/tests/integration/tests/4897-boot-package-pruned/files/stack.yaml b/tests/integration/tests/4897-boot-package-pruned/files/stack.yaml index ac8b91b050..93245d9576 100644 --- a/tests/integration/tests/4897-boot-package-pruned/files/stack.yaml +++ b/tests/integration/tests/4897-boot-package-pruned/files/stack.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: [.] extra-deps: [./directory] diff --git a/tests/integration/tests/4938-non-ascii-module-names/files/stack.yaml b/tests/integration/tests/4938-non-ascii-module-names/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/4938-non-ascii-module-names/files/stack.yaml +++ b/tests/integration/tests/4938-non-ascii-module-names/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/5180-ghc-rts-flags/files/stack.yaml b/tests/integration/tests/5180-ghc-rts-flags/files/stack.yaml index c9140ca081..0fdac44b13 100644 --- a/tests/integration/tests/5180-ghc-rts-flags/files/stack.yaml +++ b/tests/integration/tests/5180-ghc-rts-flags/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . diff --git a/tests/integration/tests/5680-share-package-across-projects/files/package-a/stack.yaml b/tests/integration/tests/5680-share-package-across-projects/files/package-a/stack.yaml index 924e437057..e64b058da6 100644 --- a/tests/integration/tests/5680-share-package-across-projects/files/package-a/stack.yaml +++ b/tests/integration/tests/5680-share-package-across-projects/files/package-a/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . - ../package-c diff --git a/tests/integration/tests/5680-share-package-across-projects/files/package-b/stack.yaml b/tests/integration/tests/5680-share-package-across-projects/files/package-b/stack.yaml index 924e437057..e64b058da6 100644 --- a/tests/integration/tests/5680-share-package-across-projects/files/package-b/stack.yaml +++ b/tests/integration/tests/5680-share-package-across-projects/files/package-b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . - ../package-c diff --git a/tests/integration/tests/5680-share-package-across-projects/files/package-c/stack.yaml b/tests/integration/tests/5680-share-package-across-projects/files/package-c/stack.yaml index a82abfb58a..d91fd6c822 100644 --- a/tests/integration/tests/5680-share-package-across-projects/files/package-c/stack.yaml +++ b/tests/integration/tests/5680-share-package-across-projects/files/package-c/stack.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . diff --git a/tests/integration/tests/6046-missing-sublib-unregister/files/stack.yaml b/tests/integration/tests/6046-missing-sublib-unregister/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/6046-missing-sublib-unregister/files/stack.yaml +++ b/tests/integration/tests/6046-missing-sublib-unregister/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/606-local-version-not-exist/files/stack.yaml b/tests/integration/tests/606-local-version-not-exist/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/606-local-version-not-exist/files/stack.yaml +++ b/tests/integration/tests/606-local-version-not-exist/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/620-env-command/files/run.sh b/tests/integration/tests/620-env-command/files/run.sh index 61ffd86cfb..61b689fe2a 100644 --- a/tests/integration/tests/620-env-command/files/run.sh +++ b/tests/integration/tests/620-env-command/files/run.sh @@ -2,6 +2,6 @@ set -euxo pipefail -stack build --resolver lts-21.12 async -eval `stack config env --resolver lts-21.12` +stack build --resolver lts-21.13 async +eval `stack config env --resolver lts-21.13` ghc Main.hs diff --git a/tests/integration/tests/717-sdist-test/files/stack.yaml b/tests/integration/tests/717-sdist-test/files/stack.yaml index eb046a3844..6ba041e3ac 100644 --- a/tests/integration/tests/717-sdist-test/files/stack.yaml +++ b/tests/integration/tests/717-sdist-test/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - package-with-th - package-with-working-th diff --git a/tests/integration/tests/763-buildable-false/files/stack.yaml b/tests/integration/tests/763-buildable-false/files/stack.yaml index 48a40374d3..97ff7b67ec 100644 --- a/tests/integration/tests/763-buildable-false/files/stack.yaml +++ b/tests/integration/tests/763-buildable-false/files/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/allow-newer-specific-packages/files/stack.yaml b/tests/integration/tests/allow-newer-specific-packages/files/stack.yaml index d03d286db7..0a27f6f11f 100644 --- a/tests/integration/tests/allow-newer-specific-packages/files/stack.yaml +++ b/tests/integration/tests/allow-newer-specific-packages/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 allow-newer: true allow-newer-deps: diff --git a/tests/integration/tests/cabal-non-buildable-bug/Main.hs b/tests/integration/tests/cabal-non-buildable-bug/Main.hs index f541d43c16..aef7970a2a 100644 --- a/tests/integration/tests/cabal-non-buildable-bug/Main.hs +++ b/tests/integration/tests/cabal-non-buildable-bug/Main.hs @@ -4,7 +4,7 @@ main :: IO () main = do -- Newer Cabal: dry run and building should succeed, because they'll -- both ignore the do-not-build - writeFile "stack.yaml" "resolver: lts-21.12" + writeFile "stack.yaml" "resolver: lts-21.13" stack ["build", "--dry-run"] stack ["build"] diff --git a/tests/integration/tests/cabal-sublibrary-dependency/files/stack.yaml b/tests/integration/tests/cabal-sublibrary-dependency/files/stack.yaml index faf5ac14a6..4ce4db4059 100644 --- a/tests/integration/tests/cabal-sublibrary-dependency/files/stack.yaml +++ b/tests/integration/tests/cabal-sublibrary-dependency/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 # GHC 9.4.7 +resolver: lts-21.13 # GHC 9.4.7 packages: - . - subproject diff --git a/tests/integration/tests/drop-packages/files/stack.yaml b/tests/integration/tests/drop-packages/files/stack.yaml index b161e77717..b77f3d8e60 100644 --- a/tests/integration/tests/drop-packages/files/stack.yaml +++ b/tests/integration/tests/drop-packages/files/stack.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 drop-packages: - unliftio-core diff --git a/tests/integration/tests/duplicate-package-ids/files/stack1.yaml b/tests/integration/tests/duplicate-package-ids/files/stack1.yaml index 41eba25e44..53ff0d5a93 100644 --- a/tests/integration/tests/duplicate-package-ids/files/stack1.yaml +++ b/tests/integration/tests/duplicate-package-ids/files/stack1.yaml @@ -1,2 +1,2 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: [] diff --git a/tests/integration/tests/duplicate-package-ids/files/stack2.yaml b/tests/integration/tests/duplicate-package-ids/files/stack2.yaml index 4ea51703fb..50de4848ed 100644 --- a/tests/integration/tests/duplicate-package-ids/files/stack2.yaml +++ b/tests/integration/tests/duplicate-package-ids/files/stack2.yaml @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - auto-update-0.1.2.1 diff --git a/tests/integration/tests/haddock-options/files/stack.yaml b/tests/integration/tests/haddock-options/files/stack.yaml index 2fa0a3320d..ca22110f56 100644 --- a/tests/integration/tests/haddock-options/files/stack.yaml +++ b/tests/integration/tests/haddock-options/files/stack.yaml @@ -2,7 +2,7 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 build: haddock-arguments: haddock-args: diff --git a/tests/integration/tests/hpack-repo/files/stack.yaml b/tests/integration/tests/hpack-repo/files/stack.yaml index a613f9c499..fa16079e84 100644 --- a/tests/integration/tests/hpack-repo/files/stack.yaml +++ b/tests/integration/tests/hpack-repo/files/stack.yaml @@ -1,6 +1,6 @@ packages: - . -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: - git: https://github.com/NorfairKing/validity.git commit: d128cc30bc886e31ea7f8161fb7708c08b162937 diff --git a/tests/integration/tests/init-omit-packages/Main.hs b/tests/integration/tests/init-omit-packages/Main.hs index bd18d2feea..9fd11cc130 100644 --- a/tests/integration/tests/init-omit-packages/Main.hs +++ b/tests/integration/tests/init-omit-packages/Main.hs @@ -5,8 +5,8 @@ import System.IO (readFile) main :: IO () main = do removeFileIgnore "stack.yaml" - stackErr ["init", "--resolver", "lts-21.12"] - stack ["init", "--resolver", "lts-21.12", "--omit-packages"] + stackErr ["init", "--resolver", "lts-21.13"] + stack ["init", "--resolver", "lts-21.13", "--omit-packages"] contents <- lines <$> readFile "stack.yaml" unless ("#- bad" `elem` contents) $ error "commented out 'bad' package was expected" diff --git a/tests/integration/tests/lock-files/files/stack-1-extra b/tests/integration/tests/lock-files/files/stack-1-extra index 12a6e0f2fa..e745096a2a 100644 --- a/tests/integration/tests/lock-files/files/stack-1-extra +++ b/tests/integration/tests/lock-files/files/stack-1-extra @@ -1,3 +1,3 @@ -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: - acme-cuteboy-0.1.0.0 diff --git a/tests/integration/tests/lock-files/files/stack-2-extras b/tests/integration/tests/lock-files/files/stack-2-extras index 3bb32cffb6..b830fac556 100644 --- a/tests/integration/tests/lock-files/files/stack-2-extras +++ b/tests/integration/tests/lock-files/files/stack-2-extras @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: - acme-cuteboy-0.1.0.0 - acme-dont-1.1 diff --git a/tests/integration/tests/module-added-multiple-times/files/stack.yaml b/tests/integration/tests/module-added-multiple-times/files/stack.yaml index 9a5d65a94e..aadc18162e 100644 --- a/tests/integration/tests/module-added-multiple-times/files/stack.yaml +++ b/tests/integration/tests/module-added-multiple-times/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 extra-deps: [] flags: {} extra-package-dbs: [] diff --git a/tests/integration/tests/multi-test/files/stack.yaml b/tests/integration/tests/multi-test/files/stack.yaml index 75cc4b868a..5a3e13719a 100644 --- a/tests/integration/tests/multi-test/files/stack.yaml +++ b/tests/integration/tests/multi-test/files/stack.yaml @@ -4,4 +4,4 @@ packages: - sub-package - cyclic extra-deps: [] -resolver: lts-21.12 +resolver: lts-21.13 diff --git a/tests/integration/tests/mutable-deps/files/stack.yaml b/tests/integration/tests/mutable-deps/files/stack.yaml index 385a065507..4928ed4f2e 100644 --- a/tests/integration/tests/mutable-deps/files/stack.yaml +++ b/tests/integration/tests/mutable-deps/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . extra-deps: diff --git a/tests/integration/tests/nice-resolver-names/Main.hs b/tests/integration/tests/nice-resolver-names/Main.hs index 74554c578f..f5f001fd93 100644 --- a/tests/integration/tests/nice-resolver-names/Main.hs +++ b/tests/integration/tests/nice-resolver-names/Main.hs @@ -8,7 +8,7 @@ import Data.List (stripPrefix) main :: IO () main = do - for_ ["lts-20.26", "lts-21.12"] $ \snapshot -> do + for_ ["lts-20.26", "lts-21.13"] $ \snapshot -> do stack ["init", "--force", "--resolver", snapshot] str <- readFile "stack.yaml" case mapMaybe (stripPrefix "resolver: ") $ lines str of diff --git a/tests/integration/tests/upload/files/stack.yaml b/tests/integration/tests/upload/files/stack.yaml index 8602ae934c..346366b855 100644 --- a/tests/integration/tests/upload/files/stack.yaml +++ b/tests/integration/tests/upload/files/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.12 +resolver: lts-21.13 packages: - . diff --git a/tests/integration/tests/watched-files/files/stack.yaml b/tests/integration/tests/watched-files/files/stack.yaml index 4c90061b0f..22d0aaa1a2 100644 --- a/tests/integration/tests/watched-files/files/stack.yaml +++ b/tests/integration/tests/watched-files/files/stack.yaml @@ -1 +1 @@ -resolver: lts-21.12 +resolver: lts-21.13 From 850ebfa08a358c3b883eaa95eaba5cb79b165535 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 25 Sep 2023 20:03:49 +0100 Subject: [PATCH 18/25] Add macOS/AArch64 to get-stack.sh --- etc/scripts/get-stack.sh | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/etc/scripts/get-stack.sh b/etc/scripts/get-stack.sh index 3878091cc6..a33342e9a3 100755 --- a/etc/scripts/get-stack.sh +++ b/etc/scripts/get-stack.sh @@ -69,12 +69,15 @@ post_install_separator() { info "" } -# determines the CPU's instruction set +# determines the CPU's instruction set architecture (ISA) get_isa() { if uname -m | grep -Eq 'armv[78]l?' ; then echo arm elif uname -m | grep -q aarch64 ; then echo aarch64 + # uname -m returns arm64 on macOS/AArch64 + elif uname -m | grep -q arm64 ; then + echo aarch64 elif uname -m | grep -q x86 ; then echo x86 else @@ -289,16 +292,22 @@ do_windows_install() { } # Attempts to install on macOS. -# If 'brew' exists, installs using Homebrew. Otherwise, installs -# the generic bindist. do_osx_install() { - info "Using generic bindist..." - info "" - install_64bit_osx_binary - info "NOTE: You may need to run 'xcode-select --install' and/or" - info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'" - info " to set up the Xcode command-line tools, which Stack uses." - info "" + if is_x86_64 ; then + install_x86_64_osx_binary + info "NOTE: You may need to run 'xcode-select --install' and/or" + info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'" + info " to set up the Xcode command-line tools, which Stack uses." + info "" + elif is_aarch64 ; then + install_aarch64_osx_binary + info "NOTE: You may need to run 'xcode-select --install' and/or" + info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'" + info " to set up the Xcode command-line tools, which Stack uses." + info "" + else + die "Sorry, currently only 64-bit (x86_64 or aarch64) macOS binary is available." + fi } # # Attempts to install on FreeBSD. Installs dependencies with @@ -581,7 +590,11 @@ install_aarch64_linux_binary() { install_from_bindist "linux-aarch64.tar.gz" } -install_64bit_osx_binary() { +install_aarch64_osx_binary() { + install_from_bindist "osx-aarch64.tar.gz" +} + +install_x86_64_osx_binary() { install_from_bindist "osx-x86_64.tar.gz" } From c14cc4d1e835f279fedb6d17fb187a027149ee06 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 25 Sep 2023 20:34:31 +0100 Subject: [PATCH 19/25] Update docs on installing for macOS/AArch64 --- doc/README.md | 27 +++++++---------------- doc/install_and_upgrade.md | 45 +++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 44 deletions(-) diff --git a/doc/README.md b/doc/README.md index ab8c7e3ed0..15202028b6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -93,13 +93,7 @@ Windows. M2 chip. These chips use an architecture known as ARM64 or AArch64. For Mac computers with Apple silicon, the easiest way to install Stack - directly (rather than use GHCup) is to obtain the 'unofficial' - `osx-aarch64` binary distribution released by the GHCup developers and - copy it to a location on the PATH. `*.tar.gz` archive files containing - those binary distributions are available at the directories here: - [:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/). - - It is still possible to use the commands: + directly (rather than use GHCup) is to command: ~~~text curl -sSL https://get.haskellstack.org/ | sh @@ -111,19 +105,14 @@ Windows. wget -qO- https://get.haskellstack.org/ | sh ~~~ - However, those commands will download and install the version of Stack - for Intel-based Mac computers. Mac computers with Apple silicon will - use Apple's - [Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to - use that version of Stack. - - Apple's Terminal application will not detect automatically that Rosetta - has not yet been installed. Rosetta can be manually installed by - commanding: + !!! note - ~~~text - softwareupdate --install-rosetta - ~~~ + The script at [get.haskellstack.org](https://get.haskellstack.org/) + will ask for root access using `sudo`. It needs such access in order + to use your platform's package manager to install dependencies and + to install to `/usr/local/bin`. If you prefer more control, follow + the manual installation instructions in the + [install and upgrade guide](install_and_upgrade.md). === "Windows" diff --git a/doc/install_and_upgrade.md b/doc/install_and_upgrade.md index fc027800fc..f30c0043b3 100644 --- a/doc/install_and_upgrade.md +++ b/doc/install_and_upgrade.md @@ -295,19 +295,8 @@ GitHub repository. Mac computers with Apple silicon have an M1, M1 Pro, M1 Max, M1 Ultra or M2 chip. These chips use an architecture known as ARM64 or AArch64. - The Stack repository uses GitHub-hosted runners to create binary - distributions for macOS. GitHub-hosted runners are not expected to be - available for macOS on Apple silicon until July to September 2023. - - Consequently, for Mac computers with Apple silicon, the easiest way to - install Stack directly (rather than use GHCup) is to obtain the - 'unofficial' `osx-aarch64` binary distribution released by the GHCup - developers and copy it to a location on the PATH. `*.tar.gz` archive - files containing those binary distributions are available at the - directories here: - [:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/). - - It is still possible to use the commands: + For Mac computers with Apple silicon, the easiest way to install Stack + directly (rather than use GHCup) is to command: ~~~text curl -sSL https://get.haskellstack.org/ | sh @@ -319,19 +308,13 @@ GitHub repository. wget -qO- https://get.haskellstack.org/ | sh ~~~ - However, those commands will download and install the version of Stack - for Intel-based Mac computers. Mac computers with Apple silicon will - use Apple's - [Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to - use that version of Stack. - - Apple's Terminal application will not detect automatically that Rosetta - has not yet been installed. Rosetta can be manually installed by - commanding: + !!! note - ~~~text - softwareupdate --install-rosetta - ~~~ + The script at [get.haskellstack.org](https://get.haskellstack.org/) + will ask for root access using `sudo`. It needs such access in order + to use your platform's package manager to install dependencies and + to install to `/usr/local/bin`. If you prefer more control, follow + the manual installation instructions below. The installation of Stack or some packages (e.g. `network`) requiring C source compilation might fail with `configure: error: C compiler cannot @@ -360,6 +343,18 @@ GitHub repository. compile x86-64 objects and attempt to link them with existing ARM64 libraries, resulting in the error above. + ### Manual download + + * Click + [:material-cloud-download-outline:](https://get.haskellstack.org/stable/osx-aarch64.tar.gz) + to download an archive file with the latest release for AArch64 + architectures. + + * Extract the archive and place `stack` somewhere on your PATH (see the + [Path](#path) section below). + + * Now you can run Stack from the command line in a terminal. + ### Using Homebrew [Homebrew](https://brew.sh/) is a popular package manager for macOS. If you From 9bf3baa100eea8b4bdadd655659f99407c1b3e36 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 25 Sep 2023 20:50:21 +0100 Subject: [PATCH 20/25] Tidy up now redundant documentation files --- doc/coverage.md | 1 - doc/dependency_visualization.md | 1 - 2 files changed, 2 deletions(-) delete mode 120000 doc/coverage.md delete mode 120000 doc/dependency_visualization.md diff --git a/doc/coverage.md b/doc/coverage.md deleted file mode 120000 index 847c11c939..0000000000 --- a/doc/coverage.md +++ /dev/null @@ -1 +0,0 @@ -./hpc_command.md \ No newline at end of file diff --git a/doc/dependency_visualization.md b/doc/dependency_visualization.md deleted file mode 120000 index f3c6e582bb..0000000000 --- a/doc/dependency_visualization.md +++ /dev/null @@ -1 +0,0 @@ -./dot_command.md \ No newline at end of file From 50d9c5ac08e88f3d867f6990836ef3fe3a4b0c3f Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 25 Sep 2023 20:54:28 +0100 Subject: [PATCH 21/25] Update ChangeLog for macOS/AArch64. --- ChangeLog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 3c3f669ba6..89b747bb5c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,8 @@ Release notes: +* Binaries are now provided for macOS/AArch64. + **Changes since v2.13.0.1:** Major changes: From c477a75c97224e5224b08ecd40b393788615df36 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Wed, 27 Sep 2023 13:14:40 +0100 Subject: [PATCH 22/25] Fix #6257 Allow MSYS2 to install on different drive to sys temp dir's --- ChangeLog.md | 2 ++ src/Stack/Setup.hs | 25 ++++++++++++++++--------- stack.cabal | 4 +--- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 89b747bb5c..bd396fbed2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -24,6 +24,8 @@ Bug fixes: * Restore message suffix `due to warnings` with `dump-logs: warning` (broken with Stack 2.11.1). +* On Windows, the `local-programs-path` directory can now be on a different + drive to the system temporary directory and MSYS2 will still be installed. ## v2.13.0.1 (release candidate) - 2023-09-16 diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index b0ebb21971..2d1fd5b943 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -43,6 +43,7 @@ import Data.Conduit.Process.Typed ( createSource ) import Data.Conduit.Zlib ( ungzip ) import Data.List.Split ( splitOn ) import qualified Data.Map as Map +import Data.Maybe ( fromJust ) import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Text.Lazy as TL @@ -65,8 +66,9 @@ import Network.HTTP.StackClient ) import Network.HTTP.Simple ( getResponseHeader ) import Path - ( (), addExtension, filename, parent, parseAbsDir - , parseAbsFile, parseRelDir, parseRelFile, toFilePath + ( (), addExtension, filename, fromAbsDir, parent + , parseAbsDir, parseAbsFile, parseRelDir, parseRelFile + , toFilePath ) import Path.CheckInstall ( warnInstallSearchPathIssues ) import Path.Extended ( fileExtension ) @@ -74,7 +76,7 @@ import Path.Extra ( toFilePathNoTrailingSep ) import Path.IO ( canonicalizePath, doesFileExist, ensureDir, executable , getPermissions, ignoringAbsence, listDir, removeDirRecur - , renameDir, renameFile, resolveFile' + , renameDir, renameFile, resolveFile', withTempDir ) import RIO.List ( headMaybe, intercalate, intersperse, isPrefixOf @@ -165,7 +167,7 @@ import Stack.Types.VersionedDownloadInfo import qualified System.Directory as D import System.Environment ( getExecutablePath, lookupEnv ) import System.IO.Error ( isPermissionError ) -import System.FilePath ( searchPathSeparator ) +import System.FilePath ( searchPathSeparator, takeDrive ) import qualified System.FilePath as FP import System.Permissions ( setFileExecutable ) import System.Uname ( getRelease ) @@ -2344,18 +2346,23 @@ withUnpackedTarball7z name si archiveFile archiveType destDir = do -- We use a short name for the temporary directory to reduce the risk of a -- filepath length of more than 260 characters, which can be problematic for -- 7-Zip even if Long Filepaths are enabled on Windows. - let tmpName = "tmp" + let tmpName = "stack-tmp" + destDrive = fromJust $ parseAbsDir $ takeDrive $ fromAbsDir destDir ensureDir (parent destDir) withRunInIO $ \run -> - -- We use the system temporary directory to reduce the risk of a filepath - -- length of more than 260 characters, which can be problematic for - -- 7-Zip even if Long Filepaths are enabled on Windows. - withSystemTempDir tmpName $ \tmpDir -> + -- We use a temporary directory in the same drive as that of 'destDir' to + -- reduce the risk of a filepath length of more than 260 characters, which can + -- be problematic for 7-Zip even if Long Filepaths are enabled on Windows. We + -- do not use the system temporary directory as it may be on a different + -- drive. + withTempDir destDrive tmpName $ \tmpDir -> run $ do liftIO $ ignoringAbsence (removeDirRecur destDir) run7z tmpDir archiveFile run7z tmpDir (tmpDir tarFile) absSrcDir <- expectSingleUnpackedDir archiveFile tmpDir + -- On Windows, 'renameDir' does not work across drives. However, we have + -- ensured that 'tmpDir' has the same drive as 'destDir'. renameDir absSrcDir destDir expectSingleUnpackedDir :: diff --git a/stack.cabal b/stack.cabal index 55f0f9d684..0ce5573ab8 100644 --- a/stack.cabal +++ b/stack.cabal @@ -1,6 +1,6 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.35.5. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -40,10 +40,8 @@ extra-source-files: doc/clean_command.md doc/config_command.md doc/CONTRIBUTING.md - doc/coverage.md doc/custom_snapshot.md doc/debugging.md - doc/dependency_visualization.md doc/dev_containers.md doc/developing_on_windows.md doc/docker_command.md From 66468fbf11823b44bbdbc155211bbadddd7f35f4 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Thu, 28 Sep 2023 20:06:42 +0100 Subject: [PATCH 23/25] Add AArch64 to Stack's preferred platforms --- ChangeLog.md | 2 ++ src/Stack/Setup.hs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index bd396fbed2..efe41a37ba 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -15,6 +15,8 @@ Behavior changes: * `stack hpc report`, `stack list`, `stack templates` and `stack uninstall` output their information to the standard output stream rather than to the standard error stream. Logging is still to the standard error stream. +* `stack upgrade` no longer assumes that binary upgrade is not supported on a + AArch64 machine architecture. Other enhancements: diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index 2d1fd5b943..6f3a4bfad8 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -2797,11 +2797,14 @@ preferredPlatforms = do I386 -> pure "i386" X86_64 -> pure "x86_64" Arm -> pure "arm" + AArch64 -> pure "aarch64" _ -> prettyThrowM $ BinaryUpgradeOnArchUnsupported arch' let hasgmp4 = False -- FIXME import relevant code from Stack.Setup? -- checkLib $(mkRelFile "libgmp.so.3") suffixes + -- 'gmp4' ceased to be relevant after Stack 1.9.3 (December 2018). | hasgmp4 = ["-static", "-gmp4", ""] + -- 'static' will cease to be relevant after Stack 2.11.1 (May 2023). | otherwise = ["-static", ""] pure $ map (\suffix -> (isWindows, concat [os, "-", arch, suffix])) suffixes From d9ccbd244669b255ddecc325bcf549a7e48ca0fc Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Fri, 29 Sep 2023 00:32:25 +0100 Subject: [PATCH 24/25] Fix stack upgrade warning message --- src/Stack/Upgrade.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Stack/Upgrade.hs b/src/Stack/Upgrade.hs index 93ad801a82..f67b04c4f8 100644 --- a/src/Stack/Upgrade.hs +++ b/src/Stack/Upgrade.hs @@ -135,11 +135,13 @@ upgrade builtHash (UpgradeOpts mbo mso) = case (mbo, mso) of -- See #2977 - if --git or --git-repo is specified, do source upgrade. (_, Just so@(SourceOpts (Just _))) -> source so (Just bo, Just so) -> binary bo `catchAny` \e -> do - prettyWarnL - [ flow "Exception occurred when trying to perform binary upgrade:" - , fromString . show $ e - , line <> flow "Falling back to source upgrade." - ] + prettyWarn $ + flow "When trying to perform binary upgrade, Stack encountered the \ + \following error:" + <> blankLine + <> ppException e + <> blankLine + <> flow "Falling back to source upgrade." source so where binary = binaryUpgrade From 8102bb8afce90fc954f48efae38b87f37cabc988 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Fri, 29 Sep 2023 20:40:12 +0100 Subject: [PATCH 25/25] Release preparation Step G --- ChangeLog.md | 105 +++++++++++++++++++++------------------------------ cabal.config | 2 +- package.yaml | 2 +- stack.cabal | 2 +- 4 files changed, 45 insertions(+), 66 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index efe41a37ba..808ce8d8ca 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,41 +1,13 @@ # Changelog -## Unreleased changes - -Release notes: - -* Binaries are now provided for macOS/AArch64. - -**Changes since v2.13.0.1:** - -Major changes: - -Behavior changes: - -* `stack hpc report`, `stack list`, `stack templates` and `stack uninstall` - output their information to the standard output stream rather than to the - standard error stream. Logging is still to the standard error stream. -* `stack upgrade` no longer assumes that binary upgrade is not supported on a - AArch64 machine architecture. - -Other enhancements: - -* Bump to Hpack 0.36.0. - -Bug fixes: - -* Restore message suffix `due to warnings` with `dump-logs: warning` (broken - with Stack 2.11.1). -* On Windows, the `local-programs-path` directory can now be on a different - drive to the system temporary directory and MSYS2 will still be installed. - -## v2.13.0.1 (release candidate) - 2023-09-16 +## v2.13.1 - 2023-09-29 Release notes: * Further to the release notes for Stack 2.3.1, the `-static` suffix has been removed from the statically linked Linux/x86_64 binaries. * The binaries for Linux/Aarch64 are now statically linked. +* Binaries are now provided for macOS/AArch64. **Changes since v2.11.1:** @@ -60,10 +32,15 @@ Behavior changes: * When unregistering many packages in a single step, Stack can now do that efficiently. Stack no longer uses GHC-supplied `ghc-pkg unregister` (which is, currently, slower). +* `stack hpc report`, `stack list`, `stack templates` and `stack uninstall` + output their information to the standard output stream rather than to the + standard error stream. Logging is still to the standard error stream. +* `stack upgrade` no longer assumes that binary upgrade is not supported on a + AArch64 machine architecture. Other enhancements: -* Bump to Hpack 0.35.5. +* Bump to Hpack 0.36.0. * Depend on `pantry-0.9.2`, for support for long filenames and directory names in archives created by `git archive`. * Avoid the duplicate resolving of usage files when parsing `*.hi` files into a @@ -96,6 +73,10 @@ Bug fixes: `-hide-all-packages`, stopping GHC from looking for a package environment in default locations. * Restore Stack script files without extensions (broken with Stack 2.11.1). +* Restore message suffix `due to warnings` with `dump-logs: warning` (broken + with Stack 2.11.1). +* On Windows, the `local-programs-path` directory can now be on a different + drive to the system temporary directory and MSYS2 will still be installed. ## v2.11.1 - 2023-05-18 @@ -411,8 +392,8 @@ Other enhancements: Bug fixes: -* `stack new` now supports branches other than `master` as default for - GitHub repositories. See +* `stack new` now supports branches other than `master` as default for GitHub + repositories. See [#5422](https://github.com/commercialhaskell/stack/issues/5422) * Ignore all errors from `hi-file-parser`. See @@ -448,8 +429,8 @@ Major changes: Behavior changes: -* File watching now takes into account specified targets, old behavior could - be restored using the new flag `--watch-all` +* File watching now takes into account specified targets, old behavior could be + restored using the new flag `--watch-all` [#5310](https://github.com/commercialhaskell/stack/issues/5310) Other enhancements: @@ -486,8 +467,8 @@ Other enhancements: Bug fixes: * When using the `STACK_YAML` env var with Docker, make the path absolute. -* Fix the problem of `stack repl foo:test:bar` failing without a project - build before that. See +* Fix the problem of `stack repl foo:test:bar` failing without a project build + before that. See [#5213](https://github.com/commercialhaskell/stack/issues/5213) * Fix `stack sdist` introducing unnecessary sublibrary syntax when using pvp-bounds. See @@ -518,8 +499,8 @@ Release notes: former, nothing needs to change). For this release, both are supported, but the next release will no longer have the `-static` variant. -* We are also deprecating the download links at https://stackage.org/stack. - See this page for the current installation instructions: +* We are also deprecating the download links at https://stackage.org/stack. See + this page for the current installation instructions: https://docs.haskellstack.org/en/stable/install_and_upgrade/. * These are the canonical locations to download the latest stable binaries from, @@ -575,11 +556,11 @@ Behavior changes: Other enhancements: -* Add `build-output-timestamps` flag in yaml. Setting it to true - prefixes each build log output line with a timestamp. +* Add `build-output-timestamps` flag in yaml. Setting it to true prefixes each + build log output line with a timestamp. -* Show warning about `local-programs-path` with spaces on windows - when running scripts. See +* Show warning about `local-programs-path` with spaces on windows when running + scripts. See [#5013](https://github.com/commercialhaskell/stack/pull/5013) * Add `ls dependencies json` which will print dependencies as JSON. @@ -641,8 +622,8 @@ Hackage-only release: Behavior changes: -* Disable WAL mode for SQLite3 databases, to improve compatibility with - some platforms and filesystems. See +* Disable WAL mode for SQLite3 databases, to improve compatibility with some + platforms and filesystems. See [#4876](https://github.com/commercialhaskell/stack/issues/4876). * By default, do not perform expiry checks in Hackage Security. See @@ -650,13 +631,12 @@ Behavior changes: Other enhancements: -* Do not rerun expected test failures. This is mostly a change that - will only affect the Stackage Curator use case, but there is now an - additional message letting the user know when a previously-failed - test case is being rerun. +* Do not rerun expected test failures. This is mostly a change that will only + affect the Stackage Curator use case, but there is now an additional message + letting the user know when a previously-failed test case is being rerun. -* Move configure information for local packages back to .stack-work to - improve caching. See +* Move configure information for local packages back to .stack-work to improve + caching. See [#4893](https://github.com/commercialhaskell/stack/issues/4893). Bug fixes: @@ -675,12 +655,12 @@ Bug fixes: avoiding a SIGTERM screwing up GHC installation. See [#4888](https://github.com/commercialhaskell/stack/issues/4888). -* Use package complete locations from lock files when resolving dependencies - in `extra-deps`. See +* Use package complete locations from lock files when resolving dependencies in + `extra-deps`. See [#4887](https://github.com/commercialhaskell/stack/issues/4887). -* Set the `HASKELL_DIST_DIR` environment to a proper package dist - directory so `doctest` is able to load modules autogenerated by Cabal. +* Set the `HASKELL_DIST_DIR` environment to a proper package dist directory so + `doctest` is able to load modules autogenerated by Cabal. * Expose package library when running tests. @@ -702,11 +682,11 @@ Hackage-only release that removes `stack.yaml` from the sdist. This is because basis on individual packages (see [#4860](https://github.com/commercialhaskell/stack/issues/4860)) -If building a `stack` executable for distribution, please download the -source code from https://github.com/commercialhaskell/stack/releases/tag/v2.1.1 -and build it using Stack itself in order to ensure identical behaviour -to official binaries. This package on Hackage is provided for convenience -and bootstrapping purposes. +If building a `stack` executable for distribution, please download the source +code from https://github.com/commercialhaskell/stack/releases/tag/v2.1.1 and +build it using Stack itself in order to ensure identical behaviour to official +binaries. This package on Hackage is provided for convenience and bootstrapping +purposes. ## v2.1.1 - 2019-06-13 @@ -724,9 +704,8 @@ features, as listed below. Major changes: -* Switch over to pantry for managing packages. This is a major change - to Stack's internals, and affects user-visible behavior in a few - places. Some highlights: +* Switch over to pantry for managing packages. This is a major change to Stack's + internals, and affects user-visible behavior in a few places. Some highlights: * Drop support for multiple package indices and legacy `00-index.tar` style indices. See [#4137](https://github.com/commercialhaskell/stack/issues/4137). diff --git a/cabal.config b/cabal.config index 5da9f2eebd..da1cb8641d 100644 --- a/cabal.config +++ b/cabal.config @@ -163,7 +163,7 @@ constraints: , socks ==0.6.1 , split ==0.2.3.5 , splitmix ==0.1.0.4 - , stack ==2.13.0.1 + , stack ==2.13.1 , static-bytes ==0.1.0 , stm ==2.5.1.0 , stm-chans ==3.0.0.9 diff --git a/package.yaml b/package.yaml index c61984fcd8..ef5a30d6a9 100644 --- a/package.yaml +++ b/package.yaml @@ -2,7 +2,7 @@ spec-version: 0.35.0 name: stack -version: '2.13.0.2' +version: '2.13.1' synopsis: The Haskell Tool Stack description: | Please see the documentation at diff --git a/stack.cabal b/stack.cabal index 0ce5573ab8..70f3500db2 100644 --- a/stack.cabal +++ b/stack.cabal @@ -5,7 +5,7 @@ cabal-version: 2.0 -- see: https://github.com/sol/hpack name: stack -version: 2.13.0.2 +version: 2.13.1 synopsis: The Haskell Tool Stack description: Please see the documentation at for usage information.