Skip to content

Commit 8bfc2d3

Browse files
authored
Merge branch 'rc/v2.13' into list-stdout
2 parents a89b6a7 + b5a350a commit 8bfc2d3

File tree

12 files changed

+55
-29
lines changed

12 files changed

+55
-29
lines changed

ChangeLog.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
Release notes:
66

7-
**Changes since v2.13.1:**
7+
**Changes since v2.13.0.1:**
88

99
Major changes:
1010

1111
Behavior changes:
1212

13+
* `stack list` outputs to standard output rather than to standard error.
14+
1315
Other enhancements:
1416

1517
Bug fixes:
1618

17-
## v2.13.1
19+
* Restore message suffix `due to warnings` with `dump-logs: warning` (broken
20+
with Stack 2.11.1).
21+
22+
## v2.13.0.1 (release candidate) - 2023-09-16
1823

1924
Release notes:
2025

cabal.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ constraints:
163163
, socks ==0.6.1
164164
, split ==0.2.3.5
165165
, splitmix ==0.1.0.4
166-
, stack ==2.14.0
166+
, stack ==2.13.0.1
167167
, static-bytes ==0.1.0
168168
, stm ==2.5.1.0
169169
, stm-chans ==3.0.0.9

doc/build_command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ This can be useful with `stack build --dry-run`.
585585

586586
### `--progress-bar` option
587587

588-
:octicons-tag-24: UNRELEASED
588+
[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1)
589589

590590
Default: `capped`
591591

doc/global_flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ to standard output (e.g. `2.9.1`) and quit.
162162

163163
## `--[no-]plan-in-log` flag
164164

165-
:octicons-tag-24: UNRELEASED
165+
[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1)
166166

167167
Default: Disabled
168168

doc/setup_command.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,30 @@ command are inconsistent and take no action.
4343
required on Linux, Stack will refer to the presence or absence of certain
4444
libraries or the versions of those libraries.
4545

46-
For example, Stack 2.11.1 considers:
46+
For example, Stack 2.13.1 considers:
4747

48-
* the version of `libc6`, the
48+
* If `libc.musl-x86_64.so.1` is present. This file is provided by the
49+
[musl libc](https://musl.libc.org/).
50+
51+
* The version of `libc6` (if musl libc is not applicable), the
4952
[GNU C Library](https://www.gnu.org/software/libc/) (glibc), that is
5053
present. The GNU C Library is designed to be backwards compatible.
5154

52-
* if `libgmp.so.3` or `libgmp.so.10` is present. These files are provided
55+
* If `libgmp.so.3` or `libgmp.so.10` is present. These files are provided
5356
by different versions of the
5457
[GNU Multiple Precision Arithmetic Library](https://gmplib.org/).
5558

56-
* if `libncursesw.so.6` is present. This file is provided by a shared
59+
* If `libncursesw.so.6` is present. This file is provided by a shared
5760
library for terminal handling with wide character support.
5861

59-
* if `libtinfo.so.5` or `libtinfo.so.6` is present. These files are
62+
* If `libtinfo.so.5` or `libtinfo.so.6` is present. These files are
6063
provided by different versions of a shared low-level terminfo library
6164
for terminal handling.
6265

63-
Stack 2.11.1 uses `ghc-build`:
66+
Stack 2.13.1 uses `ghc-build`:
6467

68+
* `musl` to indicate `libc.musl-x86_64.so.1` is present and Stack should use
69+
the GHC binary distribution for Alpine Linux.
6570
* `tinfo6` to indicate `libgmp.so.10` and `libtinfo.so.6` are present and
6671
`libc6` is compatible with `libc6` 2.32.
6772
* `tinfo6-libc6-pre232` to indicate `libgmp.so.10` and `libtinfo.so.6` are

doc/upgrade_command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ When compiling from source code, by default:
7979
`my-stack upgrade --no-only-local-bin` seeks also to upgrade `my-stack` to the
8080
latest version of Stack available.
8181

82-
* `stack upgrade --binary-version 2.11.1` seeks an upgrade to Stack 2.11.1 if
82+
* `stack upgrade --binary-version 2.13.1` seeks an upgrade to Stack 2.13.1 if
8383
available as a binary distribution for the platform, even if not newer.
8484

8585
* `stack upgrade --source-only` seeks an upgrade by building Stack with

doc/yaml_configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ build:
463463

464464
# Since 1.8. Starting with 2.0, the default is true
465465
interleaved-output: true
466-
# Since UNRELEASED. Available options are none, count-only, capped and full.
466+
# Since 2.13.1. Available options are none, count-only, capped and full.
467467
progress-bar: capped
468468
# Since 1.10.
469469
ddump-dir: ""
@@ -480,7 +480,7 @@ of the same name. For further information, see the
480480

481481
### casa
482482

483-
:octicons-tag-24: UNRELEASED
483+
[:octicons-tag-24: 2.13.1](https://github.com/commercialhaskell/stack/releases/tag/v2.13.1)
484484

485485
Default:
486486

@@ -1366,7 +1366,7 @@ setup-info:
13661366

13671367
'Platforms' are pairs of an operating system and a machine architecture (for
13681368
example, 32-bit i386 or 64-bit x86-64) (represented by the
1369-
`Cabal.Distribution.Systems.Platform` type). Stack currently (version 2.11.1)
1369+
`Cabal.Distribution.Systems.Platform` type). Stack currently (version 2.13.1)
13701370
supports the following pairs in the format of the `setup-info` key:
13711371

13721372
|Operating system|I386 arch|X86_64 arch|Other machine architectures |

package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
spec-version: 0.35.0
33

44
name: stack
5-
version: '2.14.0'
5+
version: '2.13.0.2'
66
synopsis: The Haskell Tool Stack
77
description: |
88
Please see the documentation at <https://docs.haskellstack.org>

src/Stack/Build/ConstructPlan.hs

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module Stack.Build.ConstructPlan
1010

1111
import Control.Monad.RWS.Strict
1212
( RWST, get, modify, modify', pass, put, runRWST, tell )
13+
import Control.Monad.Trans.Maybe ( MaybeT (..) )
1314
import qualified Data.List as L
1415
import qualified Data.Map.Merge.Strict as Map
1516
import qualified Data.Map.Strict as Map
@@ -1206,18 +1207,28 @@ psLocation PSRemote{} = Snap
12061207
-- tool dependencies.
12071208
checkAndWarnForUnknownTools :: Package -> M ()
12081209
checkAndWarnForUnknownTools p = do
1209-
-- Check whether the tool is on the PATH before warning about it.
1210-
warnings <- fmap catMaybes $ forM (Set.toList $ packageUnknownTools p) $
1211-
\name@(ExeName toolName) -> do
1212-
let settings = minimalEnvSettings { esIncludeLocals = True }
1213-
config <- view configL
1214-
menv <- liftIO $ configProcessContextSettings config settings
1215-
mfound <- runRIO menv $ findExecutable $ T.unpack toolName
1216-
case mfound of
1217-
Left _ -> pure $ Just $ ToolWarning name (packageName p)
1218-
Right _ -> pure Nothing
1210+
let unknownTools = Set.toList $ packageUnknownTools p
1211+
-- Check whether the tool is on the PATH or a package executable before
1212+
-- warning about it.
1213+
warnings <-
1214+
fmap catMaybes $ forM unknownTools $ \name@(ExeName toolName) ->
1215+
runMaybeT $ notOnPath toolName *> notPackageExe toolName *> warn name
12191216
tell mempty { wWarnings = (map toolWarningText warnings ++) }
12201217
pure ()
1218+
where
1219+
-- From Cabal 2.0, build-tools can specify a pre-built executable that should
1220+
-- already be on the PATH.
1221+
notOnPath toolName = MaybeT $ do
1222+
let settings = minimalEnvSettings { esIncludeLocals = True }
1223+
config <- view configL
1224+
menv <- liftIO $ configProcessContextSettings config settings
1225+
eFound <- runRIO menv $ findExecutable $ T.unpack toolName
1226+
skipIf $ isRight eFound
1227+
-- From Cabal 1.12, build-tools can specify another executable in the same
1228+
-- package.
1229+
notPackageExe toolName = MaybeT $ skipIf $ toolName `Set.member` packageExes p
1230+
warn name = MaybeT . pure . Just $ ToolWarning name (packageName p)
1231+
skipIf p' = pure $ if p' then Nothing else Just ()
12211232

12221233
-- | Warn about tools in the snapshot definition. States the tool name
12231234
-- expected and the package name using it.

src/Stack/Build/Execute.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ withExecuteEnv bopts boptsCli baseConfigOpts locals globalPackages snapshotPacka
578578
fillSep
579579
( ( fillSep
580580
( flow "Dumping log file"
581-
: [ flow msgSuffix | L.null msgSuffix ]
581+
: [ flow msgSuffix | not (L.null msgSuffix) ]
582582
)
583583
<> ":"
584584
)

0 commit comments

Comments
 (0)