Skip to content

Commit bef86b4

Browse files
committed
Merge remote-tracking branch 'commercialhaskell/release'
2 parents c005422 + c1167a6 commit bef86b4

File tree

300 files changed

+27030
-21324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+27030
-21324
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Bug Report
33
about: Report a bug in Stack
44
---
55

6-
Please follow the steps below for reporting a bug:
6+
Please follow the steps below for reporting a bug in Stack:
77

8-
Make sure that you are using the latest release (currently Stack 2.9.1). See the
8+
Make sure that you are using the latest release (currently Stack 2.9.3). See the
99
[upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade)
1010
to upgrade.
1111

@@ -45,7 +45,7 @@ stack <your command here> <args> --verbose
4545

4646
~~~text
4747
stack --version
48-
Version 2.9.1, Git revision 409d56031b4240221d656db09b2ba476fe6bb5b1 x86_64 hpack-0.35.0
48+
Version 2.9.3, Git revision 6cf638947a863f49857f9cfbf72a38a48b183e7e x86_64 hpack-0.35.1
4949
~~~
5050

5151
### Method of installation
@@ -55,3 +55,7 @@ Version 2.9.1, Git revision 409d56031b4240221d656db09b2ba476fe6bb5b1 x86_64 hpac
5555
* Via Cabal (the tool)
5656
* An unofficial package repository (please specify which)
5757
* Other (please specify)
58+
59+
### Platform
60+
61+
Your platform (machine architecture and operating system)

.github/ISSUE_TEMPLATE/docs_report.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Documentation Report
3+
about: Report if Stack's documentation appears inaccurate or incomplete
4+
---
5+
6+
Please report problems with Stack's in-app help and error messages as a Stack bug. Please follow the schema below for reporting if Stack's online documentation appears inaccurate or incomplete:
7+
8+
### Location of the documentation
9+
10+
Please provide the link to the documentation in question. All headings have permanent links associated with them.
11+
12+
### Is it inaccurate?
13+
14+
Why do you think the documentation is wrong?
15+
16+
### Is it incomplete?
17+
18+
What do you think is missing from the documentation?

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Feature Request
33
about: Request a feature be added to Stack, or discuss such a feature
44
---
55

6-
Make sure that you are using the latest release (currently Stack 2.9.1). See the
6+
Make sure that you are using the latest release (currently Stack 2.9.3). See the
77
[upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade)
88
to upgrade.
99

.github/ISSUE_TEMPLATE/question.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
name: Question
3-
about: Ask a question about Stack usage
3+
about: Ask a question about how to use Stack
44
---
55

6-
Do you have a question regarding Stack's usage that isn't covered by the online
6+
Do you have a question about how to use Stack that is not covered by the online
77
[documentation](http://haskellstack.org)? In that case please ask your question
8-
on [Stack Overflow](http://stackoverflow.com) and use
9-
[the haskell-stack tag](http://stackoverflow.com/questions/tagged/haskell-stack).
8+
at the [Haskell Community](https://discourse.haskell.org/) forum or on
9+
[Stack Overflow](http://stackoverflow.com) (use the
10+
[haskell-stack](http://stackoverflow.com/questions/tagged/haskell-stack) tag).
1011
This way your question will be more easily discoverable by other people with the
1112
same question.
1213

@@ -15,15 +16,15 @@ the [stack-templates](https://github.com/commercialhaskell/stack-templates)
1516
repository instead.
1617

1718
If you still want to ask the question here instead, please make sure that you
18-
are using the latest release (currently Stack 2.9.1). See the
19+
are using the latest release (currently Stack 2.9.3). See the
1920
[upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade)
2021
to upgrade.
2122

2223
### Stack version
2324

2425
~~~text
2526
stack --version
26-
Version 2.9.1, Git revision 409d56031b4240221d656db09b2ba476fe6bb5b1 x86_64 hpack-0.35.0
27+
Version 2.9.3, Git revision 6cf638947a863f49857f9cfbf72a38a48b183e7e x86_64 hpack-0.35.1
2728
~~~
2829

2930
### Method of installation

.github/workflows/integration-tests.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ on:
1111
- '**'
1212
workflow_dispatch:
1313

14-
# As of 11 August 2022, ubuntu-latest, windows-latest and macos-latest come with
15-
# Stack 2.7.5. windows-latest comes with NSIS 3.08, for which the default value
16-
# of the 'Unicode' installer attribute is 'true'.
14+
# Stack will use the value of the GH_TOKEN environment variable to authenticate
15+
# its requests of the GitHub REST API, providing a higher request rate limit.
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
# As of 5 May 2023, ubuntu-latest, windows-latest and macos-latest come
20+
# with Stack 2.9.3 and GHC 9.6.1. windows-latest comes with NSIS 3.08, for which
21+
# the default value of the 'Unicode' installer attribute is 'true'.
1722

1823
jobs:
1924
integration-tests:
@@ -49,21 +54,12 @@ jobs:
4954
~\AppData\Roaming\stack
5055
~\AppData\Local\Programs\stack
5156
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.cache-bust }}
52-
- name: Update PATH on Windows
53-
if: startsWith(runner.os, 'Windows')
54-
run: |
55-
# On Windows, `stack upgrade` fails to overwrite the Stack executable at
56-
# C:\hostedtoolcache\windows\stack\2.9.1\x64\, so add location of
57-
# upgraded Stack executable to the PATH for subsequent steps:
58-
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\AppData\Roaming\local\bin"
57+
5958
- name: Install deps and run checks
6059
shell: bash
6160
run: |
6261
set -ex
6362
64-
# Stack 2.9.3 is required to build Stack
65-
stack upgrade
66-
6763
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
6864
then
6965
# Retry installing nix due to nondeterministic error

.github/workflows/lint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ jobs:
2727
run: |
2828
set -ex
2929
hlint src/
30-
hlint src/ --cpp-define=WINDOWS=1
31-
hlint test/ --cpp-simple
30+
hlint test/

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
- rc/**
1010
workflow_dispatch:
1111

12-
# As of 14 November 2022, ubuntu-latest, windows-latest and macos-latest come
13-
# with Stack 2.9.1 and GHC 9.4.2.
12+
# As of 5 May 2023, ubuntu-latest, windows-latest and macos-latest come
13+
# with Stack 2.9.3 and GHC 9.6.1.
1414

1515
jobs:
1616
pedantic:
@@ -67,21 +67,12 @@ jobs:
6767
~\AppData\Roaming\stack
6868
~\AppData\Local\Programs\stack
6969
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.extra-suffix }}
70-
- name: Update PATH on Windows
71-
if: startsWith(runner.os, 'Windows')
72-
run: |
73-
# On Windows, `stack upgrade` fails to overwrite the stack executable at
74-
# C:\hostedtoolcache\windows\stack\2.9.1\x64\, so add location of
75-
# upgraded Stack executable to the PATH for subsequent steps:
76-
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\AppData\Roaming\local\bin"
70+
7771
- name: Run tests
7872
shell: bash
7973
run: |
8074
set -ex
8175
82-
# Stack 2.9.3 is required to build Stack
83-
stack upgrade
84-
8576
if [[ "${{ matrix.extra-suffix }}" == "alpine" ]]
8677
then
8778
mkdir -p ~/.stack

.hindent.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.hlint.yaml

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -51,50 +51,15 @@
5151
- Network.HTTP.StackClient
5252

5353
# Not considered useful hints
54-
- ignore: {name: "Redundant do"}
55-
- ignore: {name: "Use section"}
56-
- ignore: {name: "Use camelCase"}
57-
- ignore: {name: "Use list comprehension"}
58-
- ignore: {name: "Redundant if"}
59-
- ignore: {name: "Avoid lambda"}
60-
- ignore: {name: "Eta reduce"}
61-
- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat
62-
- ignore: {name: "Parse error"} # we trust the compiler over HLint
63-
- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions
64-
- ignore: {name: "Evaluate"}
65-
- ignore: {name: "Use &&&"}
66-
- ignore: {name: "Redundant compare"}
67-
- ignore: {name: "Use Just"}
68-
- ignore: {name: "Avoid lambda using `infix`"}
69-
70-
# Added in hlint-2.0.10, ignoring for now
71-
- ignore: {name: "Unnecessary hiding"}
72-
- ignore: {name: "Use lambda-case"}
73-
7454
- ignore:
75-
name: "Use fewer imports"
55+
name: "Use camelCase"
7656
within:
77-
- System.Process.Read # Related to 'Hide post-AMP warnings' comment
78-
- Stack.Exec # ifdef for System.Process.Read
79-
80-
# Related to 'explicit pattern matching is clearer' comment
57+
- System.Terminal
8158
- ignore:
82-
name: "Use fromMaybe"
59+
name: "Avoid lambda using `infix`"
8360
within:
84-
- Stack.Types.Config.explicitSetupDeps
85-
86-
# For clarity (related to do syntax)
87-
- ignore:
88-
name: "Reduce duplication"
89-
within:
90-
- Network.HTTP.Download.VerifiedSpec
91-
- Stack.PackageDumpSpec
92-
- Stack.Types.StackT
93-
- Stack.Docker
94-
95-
# Gives an incorrect hint that breaks type checking due to mismatched types
61+
- System.Process.Pager.pageWriter
9662
- ignore:
97-
name: "Too strict maybe"
63+
name: "Unused LANGUAGE pragma"
9864
within:
99-
- Stack.Config
100-
- Stack.Package
65+
- StackSetupShim

CONTRIBUTING.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ executable that it compiles from Haskell source code. The executable compiles
294294
that code with a dependency on the version of Cabal that ships with the
295295
specified GHC compiler. Each release of Stack will aim to support all versions
296296
of GHC and the Cabal package in Stackage snapshots published within seven years
297-
of the release. For example, snapshot LTS Haskell 2.22, published on
298-
9 August 2015, was the last to provide GHC 7.8.4 which comes with
299-
`Cabal-1.18.1.5`. Until, at least, 9 August 2022, Stack releases would aim
300-
to support GHC 7.8.4 and `Cabal-1.18.1.5`.
297+
of the release. For example, snapshot LTS Haskell 7.0, published on
298+
14 September 2016, was the first LTS Haskell snapshot to provide GHC 8.0.1 which
299+
comes with `Cabal-1.24.0.0`. Until, at least, 13 September 2023, Stack releases
300+
would aim to support the immediate predecessor, GHC 7.10.3 and `Cabal-1.22.5.0`.
301301

302302
When a version of the Stack executable actually ceases to support a version of
303303
GHC and `Cabal`, that should be recorded in Stack's
@@ -466,6 +466,15 @@ Where again, `<PATTERN>` is the name of the folder listed in the
466466
[test/integration/tests/](https://github.com/commercialhaskell/stack/tree/master/test/integration/tests)
467467
directory.
468468

469+
You can disable a few integration tests through the -n option :
470+
471+
~~~text
472+
stack build --flag stack:integration-tests stack --exec "stack-integration-test -n <PATTERN1> -n <PATTERN2>"
473+
~~~
474+
475+
To disable folders named after `<PATTERN1>` and `<PATTERN2>`
476+
It's especially useful when some tests are taking a while to complete.
477+
469478
## Continuous integration (CI)
470479

471480
We use [GitHub Actions](https://docs.github.com/en/actions) to do CI on Stack.

ChangeLog.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,71 @@
11
# Changelog
22

3+
## v2.11.1 - 2023-05-18
4+
5+
**Changes since v2.9.3:**
6+
7+
Behavior changes:
8+
9+
* Add flag `--[no-]-only-local-bin` to Stack's `upgrade` command for a binary
10+
upgrade. If the Stack executable is `my-stack`, the default is
11+
`my-stack upgrade --only-local-bin` where previously it was, effectively,
12+
`my-stack upgrade --no-only-local-bin`. If the Stack executable is `stack`,
13+
the default is `stack upgrade --no-only-local-bin`, the same behaviour as
14+
previously.
15+
* Use `$XDG_CACHE_HOME/stack/ghci-script`, rather than
16+
`<temp>/haskell-stack-ghci` (where `<temp>` is the directory yielded by the
17+
`temporary` package's `System.IO.Temp.getCanonicalTemporaryDirectory`), as the
18+
base location for GHCi script files generated by `stack ghci` or `stack repl`.
19+
See [#5203](https://github.com/commercialhaskell/stack/issues/5203)
20+
* Drop support for `Cabal` versions before 1.22 and, consequently, GHC versions
21+
before 7.10.
22+
* `stack ghci` and `stack repl` now take into account the values of
23+
`default-language` keys in Cabal files, like they take into account the values
24+
of `default-extensions` keys.
25+
* Removed `--ghc-paths`, `--global-stack-root` and `--local-bin-path` flags for
26+
`stack path`, deprecated in Stack 1.1.0 in favour of `--programs`,
27+
`--stack-root` and `local-bin` respectively.
28+
* On Windows, `stack upgrade` always renames the file of the running Stack
29+
executable (adding extension `.old`) before attempting to write to the
30+
original file name.
31+
* On Windows, `stack upgrade` does not offer `sudo` command alternatives if
32+
attempting to write to the original file name of the running Stack exectuable
33+
results in a 'Permission' error.
34+
35+
Other enhancements:
36+
37+
* Add options of the form `--PROG-option=<argument>` to `stack build`, where
38+
`PROG` is a program recognised by the Cabal library and one of `alex`, `ar`,
39+
`c2hs`, `cpphs`, `gcc`, `greencard`, `happy`, `hsc2hs`, `hscolour`, `ld`,
40+
`pkg-config`, `strip` and `tar`. If Cabal uses the program during the
41+
configuration step, the argument is passed to it.
42+
* By default all `--PROG-option` options are applied to all local packages. This
43+
behaviour can be changed with new configuration option `apply-prog-options`.
44+
* Add flag `--[no-]use-root` to `stack script` (default disabled). Used with
45+
`--compile` or `--optimize`, when enabled all compilation outputs (including
46+
the executable) are written to a script-specific location in the `scripts`
47+
directory of the Stack root rather than the script's directory, avoiding
48+
clutter of the latter directory.
49+
* Better error message if the value of the `STACK_WORK` environment variable or
50+
`--work-dir` option is not a valid relative path.
51+
* Stack will use the value of the `GH_TOKEN`, or `GITHUB_TOKEN`, environment
52+
variable as credentials to authenticate its GitHub REST API requests.
53+
* `stack uninstall` also shows how to uninstall Stack-supplied tools.
54+
55+
Bug fixes:
56+
57+
* Fix incorrect warning if `allow-newer-deps` are specified but `allow-newer` is
58+
`false`. See
59+
[#6068](https://github.com/commercialhaskell/stack/issues/6086).
60+
* `stack build` with `--file-watch` or `--file-watch-poll` outputs 'pretty'
61+
error messages, as intended. See
62+
[#5978](https://github.com/commercialhaskell/stack/issues/5978).
63+
* `stack build` unregisters any local packages for the sub libraries of a local
64+
package that is to be unregistered. See
65+
[#6046](https://github.com/commercialhaskell/stack/issues/6046).
66+
* The warning that sublibrary dependency is not supported is no longer triggered
67+
by internal libraries.
68+
369
## v2.9.3 - 2022-12-16
470

571
**Changes since v2.9.1:**
@@ -921,6 +987,15 @@ Behavior changes:
921987
download a template, Stack will check whether that template had
922988
been downloaded before. In that case, the cached version will be
923989
used. See [#3850](https://github.com/commercialhaskell/stack/issues/3850).
990+
* In Stack's script interpreter, `-- stack --verbosity=info script` and
991+
`-- stack script --verbosity=info` now have the same effect and both override
992+
the `--verbosity=error` default in the interpreter. Previously the default
993+
meant the former was equivalent to
994+
`-- stack --verbosity=info script --verbosity=error` and the latter was
995+
equivalent to `-- stack --verbosity=error script --verbosity=info`, with the
996+
subcommand's global option having precedence over the Stack command's
997+
global option in each case. See
998+
[#5326](https://github.com/commercialhaskell/stack/issues/5326).
924999

9251000
Other enhancements:
9261001

@@ -2073,7 +2148,7 @@ Behavior changes:
20732148
* Remove deprecated valid-wanted field.
20742149
* Docker: mount home directory in container
20752150
[#1949](https://github.com/commercialhaskell/stack/issues/1949).
2076-
* Deprecate `--local-bin-path` instead `--local-bin`.
2151+
* Deprecate `stack path --local-bin-path`; instead use `--local-bin`.
20772152
* `stack image`: allow absolute source paths for `add`.
20782153

20792154
Other enhancements:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2022, Stack contributors
1+
Copyright (c) 2015-2023, Stack contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@
66

77
Stack is a cross-platform program for developing Haskell projects. It is intended for Haskellers both new and experienced.
88

9-
See [haskellstack.org](http://haskellstack.org) or the [doc](./doc) directory for more
10-
information.
9+
See [haskellstack.org](http://haskellstack.org), or the [doc](./doc) directory
10+
of this repository, for more information.
11+
12+
### Learning to use Stack
13+
14+
If are learning to use Stack and have questions, a discussion at the
15+
[Haskell Community](https://discourse.haskell.org/) forum may help. See its
16+
'Learn' category.
1117

1218
### Community
1319

1420
You can participate with the Stack community in the following areas:
1521

16-
* [Haskell Foundation Slack](https://haskell-foundation.slack.com/join/shared_invite/zt-z45o9x38-8L55P27r12YO0YeEufcO2w#/shared-invite/email)
17-
* `#stack-users` for general Stack discussion
18-
* `#stack-collaborators` for working on the Stack code base
19-
* [Stack Google Group mailing list](https://groups.google.com/g/haskell-stack)
20-
* [Haskell Community Discourse](https://discourse.haskell.org/)
22+
* the [Haskell Community](https://discourse.haskell.org/) forum
23+
* the Haskell Foundation's
24+
[Slack workspace](https://haskell-foundation.slack.com/join/shared_invite/zt-z45o9x38-8L55P27r12YO0YeEufcO2w#/shared-invite/email)
25+
* `#stack-users` channel, for general Stack discussion
26+
* `#stack-collaborators` channel, for working on Stack's code base
27+
* the [Google Group mailing list](https://groups.google.com/g/haskell-stack) for Stack

0 commit comments

Comments
 (0)