Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re #6160 Move Stack on to GHC 9.2.8 #6204

Merged
merged 4 commits into from
Aug 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Re #6160 Move Stack on to GHC 9.2.8
mpilgrem committed Aug 18, 2023
commit 8d15d0ab241dca6d45be8b4cf8501581a1db0fe5
14 changes: 7 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -16,12 +16,12 @@ on:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# As of 16 June 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.11.1 and GHC 9.6.2. windows-latest comes with NSIS 3.08, for
# which the default value of the 'Unicode' installer attribute is 'true'.
# However, that is not the 'large strings' build of NSIS and creates installers
# that corrupt the PATH environment variable if the default string length of
# 1024 characters is exceeded.
# As of 8 August 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.11.1 (2.9.3 on macos-latest) and GHC 9.6.2. windows-latest comes
# with NSIS 3.08, for which the default value of the 'Unicode' installer
# attribute is 'true'. However, that is not the 'large strings' build of NSIS
# and creates installers that corrupt the PATH environment variable if the
# default string length of 1024 characters is exceeded.

jobs:
integration-tests:
@@ -81,7 +81,7 @@ jobs:
nix-channel --add https://nixos.org/channels/nixos-23.05 nixpkgs
# Download the Nix expressions for all subscribed channels...
#
# As at 2023-06-05, nixos-23.05 provides GHC 9.2.7.
# As at 2023-08-11, nixos-23.05 provides GHC 9.2.8.
nix-channel --update
# The NIX_PATH environment variable sets a list of directories used to
# look up the location of Nix expressions using paths enclosed in
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- rc/**
workflow_dispatch:

# As of 22 May 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.9.3 and GHC 9.6.1.
# As of 9 August 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.11.1 (2.9.3 on macos-latest) and GHC 9.6.2.

jobs:
pedantic:
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -286,7 +286,7 @@ Stack aims to depend on well-known packages. The specific versions on which it
depends at any time are specified by `package.yaml` and `stack.yaml`. It does
not aim to be compatible with more than one version of the `Cabal` package at
any time. At the time of writing (May 2023) the package versions are primarily
ones in Stackage snapshot LTS Haskell 20.23 (for GHC 9.2.7), together with
ones in Stackage snapshot LTS Haskell 20.26 (for GHC 9.2.8), together with
extra-dep `Cabal-3.8.1.0`.

A Stack executable makes use of Cabal (the library) through a small 'Setup'
18 changes: 8 additions & 10 deletions cabal.config
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ constraints:
, StateVar ==1.2.2
, Win32 ==2.12.0.1
, aeson ==2.0.3.0
, aeson-warning-parser ==0.1.0
, annotated-wl-pprint ==0.7.0
, ansi-terminal ==1.0
, ansi-terminal-types ==0.11.5
, ansi-wl-pprint ==0.6.9
, appar ==0.1.8
, array ==0.5.4.0
, asn1-encoding ==0.9.6
@@ -43,7 +43,8 @@ constraints:
, cmdargs ==0.10.22
, colour ==2.3.6
, comonad ==5.0.8
, conduit ==1.3.4.3
, companion ==0.1.0
, conduit ==1.3.5
, conduit-combinators ==1.3.0
, conduit-extra ==1.3.6
, connection ==0.3.1
@@ -119,9 +120,9 @@ constraints:
, old-locale ==1.0.0.7
, old-time ==1.1.0.3
, open-browser ==0.2.1.0
, optparse-applicative ==0.17.0.0
, optparse-applicative ==0.18.1.0
, optparse-simple ==0.1.1.4
, pantry ==0.8.2.2
, pantry ==0.9.1
, parsec ==3.1.15.0
, parser-combinators ==1.3.0
, path ==0.9.2
@@ -132,6 +133,8 @@ constraints:
, persistent-sqlite ==2.13.1.1
, persistent-template ==2.12.0.0
, pretty ==1.1.3.6
, prettyprinter ==1.7.1
, prettyprinter-ansi-terminal ==1.1.3
, primitive ==0.7.3.0
, process ==1.6.16.0
, project-template ==0.2.1.0
@@ -148,17 +151,16 @@ constraints:
, scientific ==0.3.7.0
, semialign ==1.2.0.1
, semigroupoids ==5.3.7
, semigroups ==0.20
, silently ==1.2.5.3
, socks ==0.6.1
, split ==0.2.3.5
, splitmix ==0.1.0.4
, stack ==2.12.0
, static-bytes ==0.1.0
, stm ==2.5.0.2
, stm-chans ==3.0.0.9
, streaming-commons ==0.2.2.6
, strict ==0.4.0.1
, syb ==0.7.2.3
, tagged ==0.8.6.1
, tar ==0.5.1.1
, tar-conduit ==0.3.2
@@ -169,10 +171,8 @@ constraints:
, text-short ==0.1.5
, th-abstraction ==0.4.5.0
, th-compat ==0.1.4
, th-expand-syns ==0.4.11.0
, th-lift ==0.8.3
, th-lift-instances ==0.1.20
, th-reify-many ==0.1.10
, these ==1.1.1.1
, time ==1.11.1.1
, time-compat ==1.9.6.1
@@ -181,8 +181,6 @@ constraints:
, transformers-base ==0.4.6
, transformers-compat ==0.7.2
, typed-process ==0.2.11.0
, unicode-data ==0.3.1
, unicode-transforms ==0.4.0.1
, unix ==2.7.2.2
, unix-compat ==0.5.4
, unix-time ==0.4.9
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@
-- 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-20.23/cabal.config.
-- https://www.stackage.org/lts-20.26/cabal.config.
--
with-compiler: ghc-9.2.7
with-compiler: ghc-9.2.8
import: cabal.config
packages: .
12 changes: 6 additions & 6 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
@@ -248,15 +248,15 @@ this:

~~~yaml
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/19.yaml
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml
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 20.23](https://www.stackage.org/lts-20.23), which
implies GHC 9.2.7 (which is why `stack build` installs that version of GHC if it
says to use [LTS Haskell 20.26](https://www.stackage.org/lts-20.26), which
implies GHC 9.2.8 (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-20.23`, as is currently the
* The appropriate resolver value (`resolver: lts-20.26`, as is currently the
latest LTS)
* The GHC version used
* A full list of all packages available in this snapshot
@@ -522,7 +522,7 @@ towards by default as well).

## Resolvers and changing your compiler version

Let's explore package sets a bit further. Instead of `lts-20.23`, let's change
Let's explore package sets a bit further. Instead of `lts-20.26`, let's change
our `stack.yaml` file to use the
[latest nightly](https://www.stackage.org/nightly). Right now, this is currently
2023-05-26 - please see the resolver from the link above to get the latest.
@@ -1340,7 +1340,7 @@ yields output like:

~~~text
Run from outside a project, using implicit global project config
Using latest snapshot resolver: lts-20.23
Using latest snapshot resolver: lts-20.26
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
6 changes: 3 additions & 3 deletions doc/Stack_and_VS_Code.md
Original file line number Diff line number Diff line change
@@ -75,9 +75,9 @@ 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-20.23`
(GHC 9.2.7), the command `ghcup install ghc 9.2.7` must have been used to
install GHC 9.2.7. That may be a minor inconvenience for some people, as one the
not already installed that version). For example, to use `resolver: lts-20.26`
(GHC 9.2.8), the command `ghcup install ghc 9.2.8` must have been used to
install GHC 9.2.8. 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
automatically ensures that the necessary version of GHC is available.

34 changes: 17 additions & 17 deletions doc/custom_snapshot.md
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ available in snapshots to ensure reproducibility.
snapshot specification.

~~~yaml
resolver: lts-20.23 # Inherits GHC version and package set
compiler: ghc-9.6.1 # Overwrites GHC version in the resolver, optional
resolver: lts-20.26 # Inherits GHC version and package set
compiler: ghc-9.6.2 # Overwrites GHC version in the resolver, optional

# Additional packages, follows extra-deps syntax
packages:
@@ -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-20.23`, but instead
use `ghc-9.2.6` instead of `ghc-9.2.7`:
The following snapshot specification will be identical to `lts-20.26`, but
instead use `ghc-9.2.7` instead of `ghc-9.2.8`:

~~~yaml
resolver: lts-20.23
compiler: ghc-9.2.6
resolver: lts-20.26
compiler: ghc-9.2.7
~~~

### Dropping packages

The following snapshot specification will be identical to `lts-20.23`, 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.
The following snapshot specification will be identical to `lts-20.26`, 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-20.23
resolver: lts-20.26
drop-packages:
- text
~~~

### Hiding packages

The following snapshot specification will be identical to `lts-20.23`, but the
The following snapshot specification will be identical to `lts-20.26`, but the
`text` package will be hidden when registering. This will affect, for example,
the import parser in the script command.

~~~yaml
resolver: lts-20.23
resolver: lts-20.26
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-20.23`, but
The following snapshot specification will be identical to `lts-20.26`, but
provides `-O1` as a ghc-option for `text`:

~~~yaml
resolver: lts-20.23
resolver: lts-20.26
packages:
- text-1.2.5.0
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-20.23`, but
following snapshot specification will be identical to `lts-20.26`, but
it enables the `developer` Cabal flag:

~~~yaml
resolver: lts-20.23
resolver: lts-20.26
packages:
- text-1.2.5.0
flags:
6 changes: 3 additions & 3 deletions doc/faq.md
Original file line number Diff line number Diff line change
@@ -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-20.23`, which is from
the _resolver_. This may be something like `lts-20.26`, 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-20.23
resolver: lts-20.26
packages:
- .
extra-deps:
@@ -91,7 +91,7 @@ Add it to the
directory where your `stack.yaml` file lives, e.g.

~~~yaml
resolver: lts-20.23
resolver: lts-20.26
packages:
- .
extra-deps:
6 changes: 3 additions & 3 deletions doc/list_command.md
Original file line number Diff line number Diff line change
@@ -41,17 +41,17 @@ Package index cache populated
Error: [S-4926]
- Could not find package paltry on Hackage. Perhaps you meant: retry, path, pantry, pretty, pasty, xattr, alloy, para, pappy, alure

stack --resolver lts-20.23 list base unix Win32 acme-missiles pantry
stack --resolver lts-20.26 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: acme-missiles

stack --resolver lts-20.23 list Win32 pantry
stack --resolver lts-20.26 list Win32 pantry
Win32-2.12.0.1
pantry-0.5.7

stack --resolver lts-20.23 list
stack --resolver lts-20.26 list
AC-Angle-1.0
ALUT-2.4.0.3
...
4 changes: 2 additions & 2 deletions doc/script_command.md
Original file line number Diff line number Diff line change
@@ -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-20.23 MyScript.hs
stack script --resolver lts-20.26 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-20.23 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!"
stack --resolver lts-20.26 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
Loading