@@ -247,18 +247,18 @@ settings. Ignoring comments beginning `#`, the contents will look something like
247
247
this:
248
248
249
249
~~~ yaml
250
- resolver :
251
- url : https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/8 .yaml
250
+ snapshot :
251
+ url : https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/11 .yaml
252
252
packages :
253
253
- .
254
254
~~~
255
255
256
- The value of the [`resolver `](yaml_configuration.md#resolver ) key tells Stack
256
+ The value of the [`snapshot `](yaml_configuration.md#snapshot ) key tells Stack
257
257
*how* to build your package: which GHC version to use, versions of package
258
258
dependencies, and so on. Our value here says to use
259
- [LTS Haskell 22.7 ](https://www.stackage.org/lts-22.7 ), which implies GHC 9.6.4
259
+ [LTS Haskell 22.11 ](https://www.stackage.org/lts-22.11 ), which implies GHC 9.6.4
260
260
(which is why `stack build` installs that version of GHC if it is not already
261
- available to Stack). There are a number of values you can use for `resolver `,
261
+ available to Stack). There are a number of values you can use for `snapshot `,
262
262
which we'll cover later.
263
263
264
264
The value of the `packages` key tells Stack which local packages to build. In
@@ -539,15 +539,15 @@ We can also change snapshots on the command line, which can be useful in a
539
539
Continuous Integration (CI) setting, like on Travis. For example, command:
540
540
541
541
~~~ text
542
- stack --resolver lts-20.26 build
542
+ stack --snapshot lts-20.26 build
543
543
# Downloaded lts-20.26 build plan.
544
544
# build output ...
545
545
~~~
546
546
547
547
When passed on the command line, you also get some additional "short-cut"
548
- versions of snapshots: ` --resolver nightly ` will use the newest Nightly snapshot
549
- available, ` --resolver lts ` will use the newest LTS, and ` --resolver lts-21 `
550
- will use the newest LTS in the 21 .x series. The reason these are only available
548
+ versions of snapshots: ` --snapshot nightly ` will use the newest Nightly snapshot
549
+ available, ` --snapshot lts ` will use the newest LTS, and ` --snapshot lts-22 `
550
+ will use the newest LTS in the 22 .x series. The reason these are only available
551
551
on the command line and not in your ` stack.yaml ` file is that using them:
552
552
553
553
1 . Will slow down your build (since Stack then needs to download information on
@@ -557,11 +557,11 @@ on the command line and not in your `stack.yaml` file is that using them:
557
557
558
558
### Changing GHC versions
559
559
560
- Finally, let's try using an older LTS snapshot. We'll use the newest 19 .x
560
+ Finally, let's try using an older LTS snapshot. We'll use the newest 21 .x
561
561
snapshot with the command:
562
562
563
563
~~~ text
564
- stack --resolver lts-19 build
564
+ stack --snapshot lts-21 build
565
565
# build output ...
566
566
~~~
567
567
@@ -676,7 +676,7 @@ editing the configuration file and removing it.
676
676
677
677
Sometimes you may want to use a specific snapshot for your project instead of
678
678
` stack init ` picking one for you. You can do that by using
679
- ` stack init --resolver <snapshot> ` .
679
+ ` stack init --snapshot <snapshot> ` .
680
680
681
681
You can also init with a compiler snapshot if you do not want to use a
682
682
Stackage snapshot. That will result in all of your project's dependencies being
@@ -714,8 +714,8 @@ it. You may see something like this:
714
714
715
715
~~~ text
716
716
stack build
717
- Warning: Some packages were found to be incompatible with the resolver and have been left commented out in the packages section.
718
- Warning: Specified resolver could not satisfy all dependencies. Some external packages have been added as dependencies.
717
+ Warning: Some packages were found to be incompatible with the snapshot and have been left commented out in the packages section.
718
+ Warning: Specified snapshot could not satisfy all dependencies. Some external packages have been added as dependencies.
719
719
You can suppress this message by removing it from stack.yaml
720
720
~~~
721
721
@@ -1056,8 +1056,8 @@ Selecting the best among 18 snapshots...
1056
1056
1057
1057
* Matches ...
1058
1058
1059
- Selected resolver : ...
1060
- Initialising configuration using resolver : ...
1059
+ Selected snapshot : ...
1060
+ Initialising configuration using snapshot : ...
1061
1061
Total number of user packages considered: 2
1062
1062
Writing configuration to file: stack.yaml
1063
1063
stack build --haddock --test
@@ -1067,7 +1067,7 @@ stack build --haddock --test
1067
1067
If you look at the ` stack.yaml ` file, you'll see exactly what you'd expect:
1068
1068
1069
1069
~~~ yaml
1070
- resolver :
1070
+ snapshot :
1071
1071
url : https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/17.yaml
1072
1072
packages :
1073
1073
- wai-app-static-3.1.7.4
@@ -1296,9 +1296,9 @@ yields output like:
1296
1296
1297
1297
~~~ text
1298
1298
Run from outside a project, using implicit global project config
1299
- Using latest snapshot resolver : lts-22.7
1299
+ Using latest snapshot snapshot : lts-22.7
1300
1300
Writing global (non-project-specific) config file to: /home/michael/.stack/global/stack.yaml
1301
- Note: You can change the snapshot via the resolver field there.
1301
+ Note: You can change the snapshot via the snapshot field there.
1302
1302
I installed the stm package via --package stm
1303
1303
~~~
1304
1304
0 commit comments