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

Bump to Stackage LTS Haskell 21.13 #6256

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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 ...
~~~

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/Stack_and_VS_Code.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions doc/custom_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
~~~
Expand All @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions doc/list_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
...
Expand Down
4 changes: 2 additions & 2 deletions doc/script_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions doc/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
-}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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!

Expand Down Expand Up @@ -239,7 +239,7 @@ example with `runghc`:
{- stack
runghc
--install-ghc
--resolver lts-21.12
--resolver lts-21.13
--package base
--package turtle
--
Expand All @@ -262,7 +262,7 @@ it. Here is an example:
{- stack
exec ghci
--install-ghc
--resolver lts-21.12
--resolver lts-21.13
--package turtle
-}
~~~
4 changes: 2 additions & 2 deletions doc/stack_yaml_vs_cabal_package_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://www.stackage.org/lts-21.12>, you will see a list of 3,010 packages at
specific version numbers. When you then specify `resolver: lts-21.12`, you're
<https://www.stackage.org/lts-21.13>, 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.

Expand Down
6 changes: 3 additions & 3 deletions doc/yaml_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
~~~
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/build-stack-installer.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{- stack script
--resolver lts-21.12
--resolver lts-21.13
--install-ghc
--package nsis
-}
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/release.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{- stack script
--resolver lts-21.12
--resolver lts-21.13
--ghc-options -Wall
-}

-- As no packages are specified in the `stack script` command in the Stack
-- 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.

Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 1 addition & 4 deletions stack-ghc-9.6.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 5 additions & 12 deletions stack-ghc-9.6.2.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading