Skip to content

Commit 133ca65

Browse files
committed
Prefer snapshot to resolver in documentation
1 parent c09d4e9 commit 133ca65

16 files changed

+66
-66
lines changed

doc/GUIDE.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -247,18 +247,18 @@ settings. Ignoring comments beginning `#`, the contents will look something like
247247
this:
248248

249249
~~~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
252252
packages:
253253
- .
254254
~~~
255255

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
257257
*how* to build your package: which GHC version to use, versions of package
258258
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
260260
(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`,
262262
which we'll cover later.
263263

264264
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
539539
Continuous Integration (CI) setting, like on Travis. For example, command:
540540

541541
~~~text
542-
stack --resolver lts-20.26 build
542+
stack --snapshot lts-20.26 build
543543
# Downloaded lts-20.26 build plan.
544544
# build output ...
545545
~~~
546546

547547
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
551551
on the command line and not in your `stack.yaml` file is that using them:
552552

553553
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:
557557

558558
### Changing GHC versions
559559

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
561561
snapshot with the command:
562562

563563
~~~text
564-
stack --resolver lts-19 build
564+
stack --snapshot lts-21 build
565565
# build output ...
566566
~~~
567567

@@ -676,7 +676,7 @@ editing the configuration file and removing it.
676676

677677
Sometimes you may want to use a specific snapshot for your project instead of
678678
`stack init` picking one for you. You can do that by using
679-
`stack init --resolver <snapshot>`.
679+
`stack init --snapshot <snapshot>`.
680680

681681
You can also init with a compiler snapshot if you do not want to use a
682682
Stackage snapshot. That will result in all of your project's dependencies being
@@ -714,8 +714,8 @@ it. You may see something like this:
714714

715715
~~~text
716716
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.
719719
You can suppress this message by removing it from stack.yaml
720720
~~~
721721

@@ -1056,8 +1056,8 @@ Selecting the best among 18 snapshots...
10561056
10571057
* Matches ...
10581058
1059-
Selected resolver: ...
1060-
Initialising configuration using resolver: ...
1059+
Selected snapshot: ...
1060+
Initialising configuration using snapshot: ...
10611061
Total number of user packages considered: 2
10621062
Writing configuration to file: stack.yaml
10631063
stack build --haddock --test
@@ -1067,7 +1067,7 @@ stack build --haddock --test
10671067
If you look at the `stack.yaml` file, you'll see exactly what you'd expect:
10681068

10691069
~~~yaml
1070-
resolver:
1070+
snapshot:
10711071
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/17.yaml
10721072
packages:
10731073
- wai-app-static-3.1.7.4
@@ -1296,9 +1296,9 @@ yields output like:
12961296

12971297
~~~text
12981298
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
13001300
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.
13021302
I installed the stm package via --package stm
13031303
~~~
13041304

doc/azure_ci.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,24 @@ But we only use the first method of using Stack to download GHC.
133133
For different GHC versions, you probably want to use different project-level
134134
configuration files (`stack.yaml`). If you don't want to put a specific
135135
`stack.yaml` for a particular snapshot and still want to test it, you have
136-
specify your resolver argument in `ARGS` environment variable (you will see an
136+
specify your snapshot argument in `ARGS` environment variable (you will see an
137137
example below).
138138

139139
~~~yaml
140140
strategy:
141141
matrix:
142142
GHC 8.0:
143-
ARGS: "--resolver lts-9"
143+
ARGS: "--snapshot lts-9"
144144
GHC 8.2:
145-
ARGS: "--resolver lts-11"
145+
ARGS: "--snapshot lts-11"
146146
GHC 8.4:
147-
ARGS: "--resolver lts-12"
147+
ARGS: "--snapshot lts-12"
148148
GHC 8.6:
149-
ARGS: "--resolver lts-14"
149+
ARGS: "--snapshot lts-14"
150150
GHC 8.8:
151-
ARGS: "--resolver lts-15"
151+
ARGS: "--snapsht lts-15"
152152
nightly:
153-
ARGS: "--resolver nightly"
153+
ARGS: "--snapshot nightly"
154154
~~~
155155

156156
## Running tests

doc/build_command.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ Examples:
809809
the most recent Stackage Nightly snapshot:
810810
811811
~~~text
812-
stack --resolver nightly install Agda-2.6.3
812+
stack --snapshot nightly install Agda-2.6.3
813813
~~~
814814
815815
Alternatively, Stack can be used to unpack the package from the package

doc/build_overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ in CLI).
7272

7373
## Wanted compiler, dependencies, and project packages
7474

75-
* If the `--resolver` CLI is present, ignore the `snapshot` (or `resolver`) and
75+
* If the `--snapshot` CLI is present, ignore the `snapshot` (or `resolver`) and
7676
`compiler` config values
7777
* Load up the indicated snapshot (either config value or CLI arg). This will
7878
provide:
@@ -81,7 +81,7 @@ in CLI).
8181
are immutable.
8282
* A wanted compiler version, e.g. `ghc-8.6.5`
8383
* If the `--compiler` CLI arg is set, or the `compiler` config value
84-
is set (and `--resolver` CLI arg is not set), ignore the wanted
84+
is set (and `--snapshot` CLI arg is not set), ignore the wanted
8585
compiler from the snapshot and use the specified wanted compiler
8686
* Parse `extra-deps` into a `Map PackageName PackageLocation`,
8787
containing both mutable and immutable package locations. Parse

doc/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ more recent LTS snapshot. You can do this using the following command from
3232
outside of a project:
3333

3434
~~~text
35-
stack config set resolver lts
35+
stack config set snapshot lts
3636
~~~
3737

3838
## Where is Stack installed and will it interfere with the GHC (etc) I already have installed?

doc/list_command.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ version of the package from Hackage. If the package name cannot be found on
1313
Hackage, even after updating the package index, suggestions (not necessarily
1414
good ones) will be made about the intended package name.
1515

16-
`stack --resolver <snapshot> list <package_name>` will send to the standard
16+
`stack --snapshot <snapshot> list <package_name>` will send to the standard
1717
output stream the version of the package in the specified snapshot, unless the
1818
package comes with GHC on Unix-like operating systems. If the package name
1919
cannot be found in the snapshot, the command will fail, identifying only the
2020
package(s) that did not appear in the snapshot.
2121

2222
More than one package name can be specified.
2323

24-
`stack --resolver <snapshot> list` will send to the standard output stream a
24+
`stack --snapshot <snapshot> list` will send to the standard output stream a
2525
list of all the packages in the specified snapshot, except those which come with
2626
GHC on Unix-like operating systems.
2727

@@ -44,17 +44,17 @@ Error: [S-4926]
4444
pantry, pretty, pasty, xattr, alloy, para, pappy, alure, polar and
4545
factory.
4646
47-
stack --resolver lts-22.7 list base unix Win32 acme-missiles pantry
47+
stack --snapshot lts-22.7 list base unix Win32 acme-missiles pantry
4848
Error: [S-4926]
4949
* Package does not appear in snapshot: base.
5050
* Package does not appear in snapshot: unix.
5151
* Package does not appear in snapshot: Win32.
5252
* Package does not appear in snapshot: acme-missiles.
5353
54-
stack --resolver lts-22.7 list pantry
54+
stack --snapshot lts-22.7 list pantry
5555
pantry-0.9.3.1
5656
57-
stack --resolver lts-22.7 list
57+
stack --snapshot lts-22.7 list
5858
AC-Angle-1.0
5959
ALUT-2.4.0.3
6060
...

doc/maintainers/7zip.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ need to be updated frequently. On 10 September 2022, it was updated from 7-Zip
7979
* executing the command:
8080
8181
~~~text
82-
stack --resolver <snapshot> setup --setup-info-yaml <path to local copy of stack-setup-2.yaml>
82+
stack --snapshot <snapshot> setup --setup-info-yaml <path to local copy of stack-setup-2.yaml>
8383
~~~
8484
8585
where `<snapshot>` requires the missing version of GHC.

doc/maintainers/docker.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ with the previous minor LTS snapshot version.
6767
- Test the new image. For example, command:
6868
6969
~~~text
70-
stack --resolver=lts-<N>.<M> new image-test
70+
stack --snapshot=lts-<N>.<M> new image-test
7171
cd image-test
7272
stack --docker build
7373
~~~
@@ -136,7 +136,7 @@ major LTS snapshot version.
136136
- Try building a test package with the new image. Command:
137137
138138
~~~text
139-
stack --resolver=nightly new image-test`
139+
stack --snapshot=nightly new image-test`
140140
cd image-test
141141
stack --docker --docker-image=local/stack-build build
142142
~~~
@@ -152,7 +152,7 @@ major LTS snapshot version.
152152
- Try building a test package with the new small image. Command:
153153
154154
~~~text
155-
stack --resolver=nightly new small-image-test
155+
stack --snapshot=nightly new small-image-test
156156
cd small-image-test
157157
stack --docker --docker-image=local/stack-build-small build
158158
~~~

doc/maintainers/ghc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Before committing, test using a command like:
4141
4242
~~~text
43-
stack --resolver=ghc-X.Y.Z setup --setup-info-yaml=path/to/stackage-content/stack/stack-setup-2.yaml
43+
stack --snapshot=ghc-X.Y.Z setup --setup-info-yaml=path/to/stackage-content/stack/stack-setup-2.yaml
4444
~~~
4545
4646
* In [stackage-content](https://github.com/fpco/stackage-content), command:

doc/maintainers/releases.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ branch.
167167
(in the `.github` directory) to point at the new release version
168168
yet!
169169
170-
* Search for old snapshot resolvers, set to latest snapshot (e.g. in
171-
`doc/GUIDE.md` where it references the "currently the latest LTS")
170+
* Search for old snapshots, set to latest snapshot (e.g. in`doc/GUIDE.md`
171+
where it references the "currently the latest LTS")
172172
* Look for any links to "latest" (`latest/`) documentation, replace with
173173
version tag
174174

doc/nix_integration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ above to use Nix flakes. The `flake.nix` file is:
128128

129129
hPkgs =
130130
pkgs.haskell.packages."ghc8107"; # need to match Stackage LTS version
131-
# from stack.yaml snapshot resolver
131+
# from stack.yaml snapshot
132132

133133
myDevTools = [
134134
hPkgs.ghc # GHC compiler in the desired version (will be available on PATH)
@@ -310,7 +310,7 @@ The `buildStackProject` utility function is documented in the
310310
Stack expects the `shell.nix` file to define a function of with one argument
311311
called `ghc` (arguments are not positional), which you should give to
312312
function `buildStackProject`. This argument is a GHC Nix package in the
313-
version as defined in the resolver you set in Stack's project-level
313+
version as defined in the snapshot you set in Stack's project-level
314314
configuration file (`stack.yaml`).
315315

316316
### Pure and impure Nix shells

doc/script_command.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ default, runs it.
1515

1616
Unlike `stack ghc` and `stack runghc`, the command ignores all Stack YAML
1717
configuration files (global and project-level). A snapshot must be specified on
18-
the command line (with the `--resolver` option). For example:
18+
the command line (with the `--snapshot` option). For example:
1919

2020
~~~text
21-
stack script --resolver lts-22.7 MyScript.hs
21+
stack script --snapshot lts-22.7 MyScript.hs
2222
~~~
2323

2424
The `stack script` command behaves as if the `--install-ghc` flag had been
@@ -100,7 +100,7 @@ main = do
100100
can be compiled and run, with arguments, with:
101101

102102
~~~text
103-
stack --resolver lts-22.7 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!"
103+
stack --snapshot lts-22.7 script --package acme-missiles --compile MyScript.hs -- "Don't panic!" "Duck and cover!"
104104
~~~
105105

106106
All the compilation outputs (like `Main.hi`, `Main.o`, and the executable
@@ -123,7 +123,7 @@ LTS Haskell 20.25, where considerations on Windows differ from non-Windows. The
123123

124124
~~~haskell
125125
{- stack script
126-
--resolver lts-20.25
126+
--snapshot lts-20.25
127127
--extra-dep acme-missiles-0.3
128128
--extra-dep directory-1.3.6.2
129129
--extra-dep process-1.6.16.0
@@ -156,7 +156,7 @@ LTS Haskell 20.25, where considerations on Windows differ from non-Windows. The
156156

157157
~~~haskell
158158
{- stack script
159-
--resolver lts-20.25
159+
--snapshot lts-20.25
160160
--extra-dep acme-missiles-0.3
161161
-}
162162

0 commit comments

Comments
 (0)