Skip to content

Commit 4103c6e

Browse files
committed
Merge remote-tracking branch 'tracsis/master' into release
2 parents 0bf1803 + 0a2f584 commit 4103c6e

File tree

121 files changed

+1807
-260
lines changed

Some content is hidden

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

121 files changed

+1807
-260
lines changed

.github/workflows/integration-tests.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,21 @@ jobs:
4949
~\AppData\Roaming\stack
5050
~\AppData\Local\Programs\stack
5151
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"
5259
- name: Install deps and run checks
5360
shell: bash
5461
run: |
5562
set -ex
5663
64+
# Stack 2.9.3 is required to build Stack
65+
stack upgrade
66+
5767
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
5868
then
5969
# Retry installing nix due to nondeterministic error
@@ -93,7 +103,8 @@ jobs:
93103
94104
- name: Build bindist
95105
shell: bash
96-
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
106+
run: |
107+
stack etc/scripts/release.hs build ${{ matrix.release-args }}
97108
98109
- name: Upload bindist
99110
uses: actions/upload-artifact@v3

.github/workflows/unit-tests.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ jobs:
2727
restore-keys: |
2828
${{ runner.os }}-
2929
- name: Pedantic build
30-
run: stack --system-ghc build --pedantic
30+
run: |
31+
# Stack 2.9.3 is required to build Stack
32+
stack upgrade
33+
stack build --pedantic
3134
unit-tests:
3235
name: Unit tests
3336
runs-on: ${{ matrix.os }}
@@ -64,11 +67,21 @@ jobs:
6467
~\AppData\Roaming\stack
6568
~\AppData\Local\Programs\stack
6669
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"
6777
- name: Run tests
6878
shell: bash
6979
run: |
7080
set -ex
7181
82+
# Stack 2.9.3 is required to build Stack
83+
stack upgrade
84+
7285
if [[ "${{ matrix.extra-suffix }}" == "alpine" ]]
7386
then
7487
mkdir -p ~/.stack

CONTRIBUTING.md

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,33 @@ updates with your pull request.
275275

276276
## Backwards Compatability
277277

278-
The Stack executable does not need to, and does not, strive for the same broad
279-
compatibility with versions of GHC that a library package (such as `pantry`)
280-
would seek. Instead, Stack aims to define a well-known combination of
281-
dependencies on which its executable relies. That applies in particular to the
282-
`Cabal` package, where Stack aims to support one, and only one, version of
283-
`Cabal` with each release of its executable. At the time of writing (September
284-
2022) that combination is defined by resolver `nightly-2022-11-14` (for
285-
GHC 9.2.4, and including `Cabal-3.6.3.0`) - see `stack.yaml`.
278+
The Stack package provides a library and an executable (`stack`) that depends on
279+
the library. The library is intended for use only by the executable.
280+
281+
Consequently, the Stack package does not need to, and does not, strive for the
282+
compatibility with a range of versions of GHC that a library package (such as
283+
`pantry`) would seek.
284+
285+
Stack aims to depend on well-known packages. The specific versions on which it
286+
depends at any time are specified by `package.yaml` and `stack.yaml`. It does
287+
not aim to be compatible with more than one version of the `Cabal` package at
288+
any time. At the time of writing (March 2023) the package versions are primarily
289+
ones in Stackage snapshot LTS Haskell 20.13 (for GHC 9.2.7), together with
290+
extra-dep `Cabal-3.8.1.0`.
291+
292+
A Stack executable makes use of Cabal (the library) through a small 'Setup'
293+
executable that it compiles from Haskell source code. The executable compiles
294+
that code with a dependency on the version of Cabal that ships with the
295+
specified GHC compiler. Each release of Stack will aim to support all versions
296+
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`.
301+
302+
When a version of the Stack executable actually ceases to support a version of
303+
GHC and `Cabal`, that should be recorded in Stack's
304+
[ChangeLog](https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md).
286305

287306
## Code Quality
288307

@@ -329,6 +348,48 @@ Once installed, you can check your changes with command:
329348
stack exec -- sh ./etc/scripts/hlint.sh
330349
~~~
331350

351+
## Code Style
352+
353+
A single code style is not applied consistently to Stack's code and Stack is not
354+
Procrustean about matters of style. Rules of thumb, however, are:
355+
356+
* keep pull requests that simply reformat code separate from those that make
357+
other changes to code; and
358+
* when making changes to code other than reformatting, follow the existing style
359+
of the function(s) or module(s) in question.
360+
361+
That said, the following may help:
362+
363+
* Stack's code generally avoids the use of C preprocessor (CPP) directives.
364+
Windows and non-Windows code is separated in separate source code directories
365+
and distinguished in Stack's Cabal file. `Stack.Constants.osIsWindows :: Bool`
366+
is provided. Multi-line strings are generally formatted on the assumption that
367+
GHC's `CPP` language pragma is not being used.
368+
* Language pragmas usually start with `NoImplictPrelude`, where applicable, and
369+
then all others are listed alphabetically. The closing `#-}` are aligned, for
370+
purely aesthetic reasons.
371+
* Stack is compiled with GHC's `-Wall` enabled, which includes `-Wtabs` (no tabs
372+
in source code). Most modules are based on two spaces (with one space for a
373+
`where`) for indentation but older and larger modules are still based on four
374+
spaces.
375+
* Stack's code and documentation tends to be based on lines of no more than 80
376+
characters or, if longer, no longer than necessary.
377+
* Stack uses export lists.
378+
* Stack's imports are listed alphabetically, including `Stack.Prelude`, where
379+
applicable. The module names are left aligned, with space left for `qualified`
380+
where it is absent.
381+
* Stack's code is sufficiently stable that explict import lists can sensibly be
382+
used. The exception is the import of `Stack.Prelude`. Not all modules have
383+
comprehensive explicit import lists.
384+
* Short explicit import lists follow the module name. Longer lists start on the
385+
line below the module name. Spaces are used to separate listed items from
386+
their enclosing parentheses.
387+
* As noted above, the types used to implement Stack's exceptions and the related
388+
`instance` definitions are usually located at the top of the relevant module.
389+
* In function type signatures, the `::` is kept on the same line as the
390+
function's name. This format is Haskell syntax highlighter-friendly.
391+
* If `where` is used, the declarations follow on a separate line.
392+
332393
## Testing
333394

334395
The Stack code has both unit tests and integration tests. Integration tests can

cabal.config

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
constraints:
2-
, Cabal ==3.6.3.0
3-
, Cabal-syntax ==3.6.0.0
2+
, Cabal ==3.8.1.0
3+
, Cabal-syntax ==3.8.1.0
44
, Glob ==0.10.2
55
, OneTuple ==0.3.1
66
, QuickCheck ==2.14.2
77
, StateVar ==1.2.2
8+
, Win32 ==2.12.0.1
89
, aeson ==2.0.3.0
910
, annotated-wl-pprint ==0.7.0
10-
, ansi-terminal ==0.11.3
11+
, ansi-terminal ==0.11.4
1112
, ansi-wl-pprint ==0.6.9
1213
, appar ==0.1.8
1314
, array ==0.5.4.0
@@ -19,126 +20,127 @@ constraints:
1920
, attoparsec ==0.14.4
2021
, attoparsec-iso8601 ==1.0.2.1
2122
, auto-update ==0.1.6
22-
, base ==4.16.3.0
23+
, base ==4.16.4.0
2324
, base-compat ==0.12.2
2425
, base-compat-batteries ==0.12.2
25-
, base-orphans ==0.8.7
26+
, base-orphans ==0.8.8.2
2627
, base16-bytestring ==1.0.2.0
2728
, base64-bytestring ==1.2.1.0
2829
, basement ==0.0.15
29-
, bifunctors ==5.5.12
30+
, bifunctors ==5.5.15
3031
, binary ==0.8.9.0
3132
, blaze-builder ==0.4.2.2
3233
, blaze-html ==0.9.1.2
3334
, blaze-markup ==0.8.2.8
3435
, byteorder ==1.0.4
35-
, bytestring ==0.11.3.1
36+
, bytestring ==0.11.4.0
3637
, casa-client ==0.0.1
3738
, casa-types ==0.0.2
3839
, case-insensitive ==1.2.1.0
3940
, cereal ==0.5.8.3
4041
, clock ==0.8.3
41-
, cmdargs ==0.10.21
42+
, cmdargs ==0.10.22
4243
, colour ==2.3.6
4344
, comonad ==5.0.8
44-
, conduit ==1.3.4.2
45+
, conduit ==1.3.4.3
4546
, conduit-combinators ==1.3.0
4647
, conduit-extra ==1.3.6
4748
, connection ==0.3.1
4849
, containers ==0.6.5.1
4950
, contravariant ==1.5.5
50-
, cookie ==0.4.5
51+
, cookie ==0.4.6
5152
, cryptohash-sha256 ==0.11.102.1
5253
, cryptonite ==0.30
5354
, cryptonite-conduit ==0.2.2
55+
, data-array-byte ==0.1.0.1
5456
, data-default-class ==0.1.2.0
5557
, data-fix ==0.3.2
5658
, deepseq ==1.4.6.1
57-
, digest ==0.0.1.3
59+
, digest ==0.0.1.7
5860
, directory ==1.3.6.2
5961
, distributive ==0.6.2.1
6062
, dlist ==1.0
61-
, easy-file ==0.2.2
63+
, easy-file ==0.2.3
6264
, echo ==0.1.4
6365
, ed25519 ==0.0.5.0
6466
, exceptions ==0.10.4
65-
, extra ==1.7.12
66-
, fast-logger ==3.1.1
67+
, extra ==1.7.13
68+
, fast-logger ==3.1.2
6769
, file-embed ==0.0.15.0
6870
, filelock ==0.1.1.5
6971
, filepath ==1.4.2.2
7072
, fsnotify ==0.4.1.0
71-
, generic-deriving ==1.14.2
73+
, generic-deriving ==1.14.3
7274
, ghc-bignum ==1.2
73-
, ghc-boot-th ==9.2.4
75+
, ghc-boot-th ==9.2.7
7476
, ghc-prim ==0.8.0
75-
, githash ==0.1.6.2
76-
, hackage-security ==0.6.2.2
77-
, hashable ==1.4.1.0
77+
, githash ==0.1.6.3
78+
, hackage-security ==0.6.2.3
79+
, hashable ==1.4.2.0
7880
, hi-file-parser ==0.1.3.0
7981
, hinotify ==0.4.1
8082
, hourglass ==0.2.12
81-
, hpack ==0.35.0
83+
, hpack ==0.35.2
8284
, hpc ==0.6.1.0
8385
, http-api-data ==0.4.3
8486
, http-client ==0.7.13.1
8587
, http-client-tls ==0.3.6.1
8688
, http-conduit ==2.3.8
8789
, http-download ==0.2.0.0
8890
, http-types ==0.12.3
89-
, indexed-traversable ==0.1.2
90-
, indexed-traversable-instances ==0.1.1.1
91+
, indexed-traversable ==0.1.2.1
92+
, indexed-traversable-instances ==0.1.1.2
9193
, infer-license ==0.2.0
9294
, integer-gmp ==1.1
9395
, integer-logarithms ==1.0.3.1
9496
, iproute ==1.7.12
9597
, libyaml ==0.1.2
96-
, lift-type ==0.1.0.1
98+
, lift-type ==0.1.1.1
9799
, lifted-base ==0.2.3.12
98100
, lukko ==0.1.1.3
99101
, megaparsec ==9.2.2
100102
, memory ==0.17.0
101103
, microlens ==0.4.12.0
102-
, microlens-mtl ==0.2.0.2
103-
, microlens-th ==0.4.3.10
104+
, microlens-mtl ==0.2.0.3
105+
, microlens-th ==0.4.3.11
104106
, mime-types ==0.1.0.9
105107
, mintty ==0.1.4
106108
, monad-control ==1.0.3.1
107-
, monad-logger ==0.3.37
109+
, monad-logger ==0.3.39
108110
, monad-loops ==0.4.3
109111
, mono-traversable ==1.0.15.3
110112
, mtl ==2.2.2
111113
, mtl-compat ==0.2.2
112114
, mustache ==2.4.1
113115
, neat-interpolation ==0.5.1.3
114-
, network ==3.1.2.7
115-
, network-uri ==2.6.4.1
116+
, network ==3.1.2.8
117+
, network-uri ==2.6.4.2
116118
, old-locale ==1.0.0.7
117119
, old-time ==1.1.0.3
118120
, open-browser ==0.2.1.0
119121
, optparse-applicative ==0.17.0.0
120122
, optparse-simple ==0.1.1.4
121-
, pantry ==0.7.0
123+
, pantry ==0.8.2.1
122124
, parsec ==3.1.15.0
123125
, parser-combinators ==1.3.0
124126
, path ==0.9.2
125127
, path-io ==1.7.0
126128
, path-pieces ==0.2.1
127129
, pem ==0.2.4
128-
, persistent ==2.13.3.5
129-
, persistent-sqlite ==2.13.1.0
130+
, persistent ==2.14.5.0
131+
, persistent-sqlite ==2.13.1.1
130132
, persistent-template ==2.12.0.0
131133
, pretty ==1.1.3.6
132134
, primitive ==0.7.3.0
133-
, process ==1.6.13.2
135+
, process ==1.6.16.0
134136
, project-template ==0.2.1.0
135137
, random ==1.2.1.1
136138
, resource-pool ==0.2.3.2
137139
, resourcet ==1.2.6
138140
, retry ==0.9.3.0
139141
, rio ==0.1.22.0
140142
, rio-orphans ==0.1.2.0
141-
, rio-prettyprint ==0.1.1.0
143+
, rio-prettyprint ==0.1.4.0
142144
, rts ==1.0.2
143145
, safe ==0.3.19
144146
, safe-exceptions ==0.1.7.3
@@ -152,10 +154,10 @@ constraints:
152154
, splitmix ==0.1.0.4
153155
, stack ==2.10.0
154156
, stm ==2.5.0.2
155-
, stm-chans ==3.0.0.6
156-
, streaming-commons ==0.2.2.4
157+
, stm-chans ==3.0.0.9
158+
, streaming-commons ==0.2.2.5
157159
, strict ==0.4.0.1
158-
, syb ==0.7.2.1
160+
, syb ==0.7.2.3
159161
, tagged ==0.8.6.1
160162
, tar ==0.5.1.1
161163
, tar-conduit ==0.3.2
@@ -164,10 +166,10 @@ constraints:
164166
, text ==1.2.5.0
165167
, text-metrics ==0.3.2
166168
, text-short ==0.1.5
167-
, th-abstraction ==0.4.4.0
169+
, th-abstraction ==0.4.5.0
168170
, th-compat ==0.1.4
169-
, th-expand-syns ==0.4.10.0
170-
, th-lift ==0.8.2
171+
, th-expand-syns ==0.4.11.0
172+
, th-lift ==0.8.3
171173
, th-lift-instances ==0.1.20
172174
, th-reify-many ==0.1.10
173175
, these ==1.1.1.1
@@ -177,14 +179,14 @@ constraints:
177179
, transformers ==0.5.6.2
178180
, transformers-base ==0.4.6
179181
, transformers-compat ==0.7.2
180-
, typed-process ==0.2.10.1
181-
, unicode-data ==0.3.0
182+
, typed-process ==0.2.11.0
183+
, unicode-data ==0.3.1
182184
, unicode-transforms ==0.4.0.1
183185
, unix ==2.7.2.2
184186
, unix-compat ==0.5.4
185-
, unix-time ==0.4.7
186-
, unliftio ==0.2.22.0
187-
, unliftio-core ==0.2.0.1
187+
, unix-time ==0.4.9
188+
, unliftio ==0.2.24.0
189+
, unliftio-core ==0.2.1.0
188190
, unordered-containers ==0.2.19.1
189191
, uuid-types ==1.0.5
190192
, vault ==0.3.1.5
@@ -195,6 +197,6 @@ constraints:
195197
, x509-store ==1.6.9
196198
, x509-system ==1.6.7
197199
, x509-validation ==1.6.12
198-
, yaml ==0.11.8.0
199-
, zip-archive ==0.4.2.1
200+
, yaml ==0.11.11.0
201+
, zip-archive ==0.4.3
200202
, zlib ==0.6.3.0

0 commit comments

Comments
 (0)