Skip to content

Commit 2adc11c

Browse files
committed
Merge branch 'stable'
2 parents a3807fe + 59f3e81 commit 2adc11c

17 files changed

+67
-64
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ The `pedantic` job runs on `ubuntu` only and builds Stack with the
549549
`--pedantic` flag.
550550

551551
The `unit-tests` job runs on a matrix of operating systems and Stack
552-
project-level YAML configuration files (`stack.yaml`). It builds and tests Stack
553-
with the following flags: `--haddock --no-haddock-deps`.
552+
project-level YAML configuration files (`stack.yaml`, by default). It builds and
553+
tests Stack with the following flags: `--haddock --no-haddock-deps`.
554554

555555
Its approach to creating a cache depends on the operating system. Its 'Cache
556556
dependencies on Unix-like OS' step caches the Stack root on Unix-like operating

ChangeLog.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Bug fixes:
279279
Hackage-only release of the `stack` package:
280280

281281
* Supports building against snapshot Stackage LTS Haskell 21.0 (GHC 9.4.5),
282-
without extra deps.
282+
without extra-deps.
283283
* Supports build with `persistent-2.14.5.0`, using CPP directives.
284284
* Supports build with `unix-compat-0.7`, by removing reliance on the module
285285
`System.PosixCompat.User` removed in that package.
@@ -1650,7 +1650,7 @@ Bug fixes:
16501650
* `stack script` can now handle relative paths to source files.
16511651
See [#3372](https://github.com/commercialhaskell/stack/issues/3372).
16521652
* Fixes explanation of why a target is needed by the build plan, when the
1653-
target is an extra dependency from the commandline.
1653+
target is an extra-dep from the commandline.
16541654
See [#3378](https://github.com/commercialhaskell/stack/issues/3378).
16551655
* Previously, if you delete a yaml file from ~/.stack/build-plan, it would
16561656
trust the etag and not re-download. Fixed in this version.
@@ -2480,8 +2480,8 @@ Major changes:
24802480
* Overall it should now be able to initialize almost all existing Cabal
24812481
packages out of the box as long as the package itself is consistently
24822482
defined.
2483-
* Choose the best possible snapshot and add extra dependencies on top
2484-
of a snapshot resolver rather than a compiler resolver -
2483+
* Choose the best possible snapshot and add extra-deps on top
2484+
of a snapshot other than a compiler snapshot -
24852485
[#1583](https://github.com/commercialhaskell/stack/pull/1583)
24862486
* Automatically omit a package (`--omit-packages`) when it is compiler
24872487
incompatible or when there are packages with conflicting dependency
@@ -2948,7 +2948,7 @@ Bug fixes:
29482948

29492949
* Hacky workaround for optparse-applicative issue with `stack exec --help`
29502950
[#806](https://github.com/commercialhaskell/stack/issues/806)
2951-
* Build executables for local extra deps
2951+
* Build executables for local extra-deps
29522952
[#920](https://github.com/commercialhaskell/stack/issues/920)
29532953
* copyFile can't handle directories
29542954
[#942](https://github.com/commercialhaskell/stack/pull/942)

doc/GUIDE.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ followed by the module name.
13371337
!!! note
13381338

13391339
If you have added packages to your project please make sure to mark them as
1340-
extra deps for faster and reliable usage of `stack ghci`. Otherwise GHCi may
1340+
extra-deps for faster and reliable usage of `stack ghci`. Otherwise GHCi may
13411341
have trouble due to conflicts of compilation flags or having to
13421342
unnecessarily interpret too many modules. See Stack's project-level
13431343
[configuration](yaml_configuration.md#extra-deps) to learn how to
@@ -1424,10 +1424,10 @@ Cabal (the tool), and NixOS. In that sense, we're sharing the same ecosystem.
14241424
### Curation vs dependency solving
14251425

14261426
* Stack uses 'curation' (snapshots and Stack's project-level configuration file
1427-
(`stack.yaml`) define precisely the set of packages available for a project).
1428-
The Stack team firmly believes that the majority of users want to simply
1429-
ignore dependency resolution nightmares and get a valid build plan from day
1430-
one. That's why we've made 'curation' the focus of Stack.
1427+
(`stack.yaml`, by default) define precisely the set of packages available for
1428+
a project). The Stack team firmly believes that the majority of users want to
1429+
simply ignore dependency resolution nightmares and get a valid build plan from
1430+
day one. That's why we've made 'curation' the focus of Stack.
14311431

14321432
* Cabal (the tool) can use 'curation' too but its origins are in dependency
14331433
solving.

doc/azure_ci.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ But we only use the first method of using Stack to download GHC.
131131
### Multiple GHC - parametrised builds
132132

133133
For different GHC versions, you probably want to use different project-level
134-
configuration files (`stack.yaml`). If you don't want to put a specific
135-
`stack.yaml` for a particular snapshot and still want to test it, you have
136-
specify your snapshot argument in `ARGS` environment variable (you will see an
137-
example below).
134+
configuration files (`stack.yaml`, by default). If you don't want to put a
135+
specific `stack.yaml` for a particular snapshot and still want to test it, you
136+
have specify your snapshot argument in `ARGS` environment variable (you will see
137+
an example below).
138138

139139
~~~yaml
140140
strategy:

doc/build_command.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This ability to specify a component applies only to a project package. With
6767
dependencies, Stack will *always* build the library (if present) and all
6868
executables (if any), and ignore test suites and benchmarks. If you want more
6969
control over a package, you must add it to your `packages` setting in your
70-
project-level configuration file (`stack.yaml`).
70+
project-level configuration file (`stack.yaml`, by default).
7171

7272
## Target syntax
7373

@@ -76,9 +76,9 @@ supported syntaxes for targets are:
7676

7777
* *package*, e.g. `stack build foobar`, is the most commonly used target. It
7878
will try to find the package in the following locations: project packages,
79-
extra deps, snapshots, and package index (e.g. Hackage). If it's found in
80-
the package index, then the latest version of that package from the index is
81-
implicitly added to your extra dependencies.
79+
extra-deps, the snapshot, and the package index (e.g. Hackage). If it's
80+
found in the package index, then the latest version of that package from the
81+
index is implicitly added as an extra-dep.
8282

8383
If the package is a project package, the library and executable components
8484
are selected to be built. If the `--test` and `--bench` flags are set, then
@@ -813,7 +813,7 @@ Examples:
813813
index into a local project directory named after the package identifier (for
814814
further infomation, see the [`stack unpack` command](unpack_command.md)
815815
documentation) and, if the package does not provide its own Stack
816-
configuration file (`stack.yaml`), to attempt to initialise that
816+
configuration file (`stack.yaml`, by default), to attempt to initialise that
817817
configuration (for further information, see the
818818
[`stack init` command](init_command.md) documentation). For example:
819819

doc/config_command.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ stack config set install-ghc [--global] true|false
6161

6262
`stack config set install-ghc true` or `false` sets the `install-ghc` key in a
6363
YAML configuration file, accordingly. By default, the project-level
64-
configuration file (`stack.yaml`) is altered. The `--global` flag specifies the
65-
user-specific global configuration file (`config.yaml`).
64+
configuration file (`stack.yaml`, by default) is altered. The `--global` flag
65+
specifies the user-specific global configuration file (`config.yaml`).
6666

6767
## The `stack config set package-index download-prefix` command
6868

@@ -74,9 +74,9 @@ stack config set package-index download-prefix [--global] [URL]
7474

7575
`stack config set package-index download-prefix <url>` sets the
7676
`download-prefix` key of the `package-index` key in a YAML configuration file,
77-
accordingly. By default, the project-level configuration file (`stack.yaml`) is
78-
altered. The `--global` flag specifies the user-specific global configuration
79-
file (`config.yaml`).
77+
accordingly. By default, the project-level configuration file (`stack.yaml`, by
78+
default) is altered. The `--global` flag specifies the user-specific global
79+
configuration file (`config.yaml`).
8080

8181
## The `stack config set resolver` command
8282

@@ -97,7 +97,8 @@ stack config set snapshot SNAPSHOT
9797
~~~
9898

9999
`stack config set snapshot <snapshot>` sets the `snapshot` key in the
100-
project-level configuration file (`stack.yaml`) to the specified snapshot.
100+
project-level configuration file (`stack.yaml`, by default) to the specified
101+
snapshot.
101102

102103
A snapshot of `lts` or `nightly` will be translated into the most recent
103104
available. A snapshot of `lts-22` will be translated into the most recent
@@ -113,5 +114,5 @@ stack config set system-ghc [--global] true|false
113114

114115
`stack config set system-ghc true` or `false` sets the `system-ghc` key in a
115116
YAML configuration file, accordingly. By default, the project-level
116-
configuration file (`stack.yaml`) is altered. The `--global` flag specifies the
117-
user-specific global configuration file (`config.yaml`).
117+
configuration file (`stack.yaml`, by default) is altered. The `--global` flag
118+
specifies the user-specific global configuration file (`config.yaml`).

doc/dev_containers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ development environment.
99

1010
Stack provides the following Dev Containers:
1111

12-
* a default Dev Container, intended for use with Stack's project‑level
13-
configuration (`stack.yaml`); and
12+
* a default Dev Container, intended for use with Stack's default project‑level
13+
configuration file (`stack.yaml`); and
1414
* alternative Dev Containers, intended for use with Stack's experimental
1515
project‑level configurations (in anticipation of building Stack with more
1616
recent versions of GHC).

doc/faq.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ the _snapshot_. This may be something like `lts-22.7`, which is from
1414
the snapshot in more detail.
1515

1616
The snapshot is determined by finding the relevant project-level configuration
17-
file (`stack.yaml`) for the directory you're running the command from. This
18-
essentially works by:
17+
file (`stack.yaml`, by default) for the directory you're running the command
18+
from. This essentially works by:
1919

2020
1. Check for a `STACK_YAML` environment variable or the `--stack-yaml`
2121
command line argument
@@ -298,8 +298,8 @@ of those three. Updating the index will have no impact on Stack's behavior.
298298

299299
## I have a custom package index I'd like to use, how do I do so?
300300

301-
You can configure this in your project-level configuration file (`stack.yaml`).
302-
See [YAML configuration](yaml_configuration.md).
301+
You can configure this in your project-level configuration file (`stack.yaml`,
302+
by default). See [YAML configuration](yaml_configuration.md).
303303

304304
## How can I make sure my project builds against multiple GHC versions?
305305

doc/glossary.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The following terms are used in Stack's documentation.
1515
|dependency |A Haskell package other than a project package and on which a project package depends (directly or indirectly), located locally or elsewhere.|
1616
|Docker |A [platform](https://www.docker.com/) for developing, shipping, and running applications. It can package and run an application in a loosely isolated environment called a _container_.|
1717
|Emacs |[GNU Emacs](https://www.gnu.org/software/emacs/), an extensible, customisable text editor.|
18-
|extra-deps |Packages (one version of each) that add to, or amend, those specified in a snapshot. Named after a key used in `stack.yaml` files.|
18+
|extra-deps |Extra dependencies (one version of each) that add to, or shadow, those specified in a snapshot.|
1919
|FreeBSD |A Unix-like operating system. |
2020
|GCC |The [GNU Compiler Collection](https://gcc.gnu.org/) or its executable `gcc`.|
2121
|GHC |The [Glasgow Haskell Compiler](https://www.haskell.org/ghc/).|
@@ -41,7 +41,7 @@ The following terms are used in Stack's documentation.
4141
|`package.yaml` |A file that describes a package in the Hpack format. |
4242
|Pantry |A library for content-addressable Haskell package management, provided by the [`pantry` package](https://hackage.haskell.org/package/pantry). A dependency of Stack.|
4343
|PATH |The `PATH` environment variable, specifying a list of directories searched for executable files.|
44-
|project |A Stack project is a local directory that contains a project-level configuration file (`stack.yaml`). A project may relate to more than one project package.|
44+
|project |A Stack project is a local directory that contains a project-level configuration file (`stack.yaml`, by default). A project may relate to more than one project package.|
4545
|project package |A Haskell package that is part of a project and located locally. Distinct from a dependency located locally.|
4646
|PVP |The Haskell [Package Versioning Policy](https://pvp.haskell.org/), which tells developers of libraries how to set their version numbers.|
4747
|REPL |An interactive (run-eval-print loop) programming environment.|

doc/init_command.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
stack init [DIR(S)] [--omit-packages] [--force] [--ignore-subdirs]
77
~~~
88

9-
`stack init` initialises Stack's project-level YAML configuration file
9+
`stack init` initialises Stack's default project-level YAML configuration file
1010
(`stack.yaml`) for an existing project, based on the Cabal file or
1111
`package.yaml` file for each of its packages.
1212

doc/lock_files.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ they are created and updated.
3939
## stack.yaml and snapshot files
4040

4141
Relevant to this discussion, Stack's project-level configuration file
42-
(`stack.yaml`) specifies:
42+
(`stack.yaml`, by default) specifies:
4343

4444
* the parent snapshot (the [`snapshot`](yaml_configuration.md#snapshot) or
4545
[`resolver`](yaml_configuration.md#resolver) key)
@@ -103,7 +103,7 @@ common case of no changes.
103103

104104
The lock file contains the following information:
105105

106-
* Completed package locations for extra deps and packages in snapshot files
106+
* Completed package locations for extra-deps and packages in snapshot files
107107

108108
!!! note
109109

@@ -148,9 +148,9 @@ packages:
148148

149149
## Creation procedure
150150

151-
Whenever a project-level configuration file (`stack.yaml`) is loaded, Stack
152-
checks for a lock file in the same file path, with a `.lock` extension added.
153-
For example, if you command:
151+
Whenever a project-level configuration file (`stack.yaml`, by default) is
152+
loaded, Stack checks for a lock file in the same file path, with a `.lock`
153+
extension added. For example, if you command:
154154

155155
~~~text
156156
stack --stack-yaml my-stack.yaml build
@@ -177,9 +177,9 @@ created by:
177177

178178
## Update procedure
179179

180-
Whenever a project-level configuration file (`stack.yaml`) is loaded, all
181-
completed package or snapshot locations (even those completed using information
182-
from a lock file) get collected to form a new lock file in memory. Subject to
183-
Stack's [`--lock-file`](global_flags.md#-lock-file-option) option, that new lock
184-
file is compared against the one on disk and, if there are any differences,
185-
written out to the disk.
180+
Whenever a project-level configuration file (`stack.yaml`, by default) is
181+
loaded, all completed package or snapshot locations (even those completed using
182+
information from a lock file) get collected to form a new lock file in memory.
183+
Subject to Stack's [`--lock-file`](global_flags.md#-lock-file-option) option,
184+
that new lock file is compared against the one on disk and, if there are any
185+
differences, written out to the disk.

doc/nix_integration.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ 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
313313
version as defined in the snapshot you set in Stack's project-level
314-
configuration file (`stack.yaml`).
314+
configuration file (`stack.yaml`, by default).
315315

316316
### Pure and impure Nix shells
317317

@@ -377,7 +377,8 @@ set.
377377

378378
Below is a summary of the non-project specific configuration options and their
379379
default values. The options can be set in Stack's project-level configuration
380-
file (`stack.yaml`) or its global configuration file (`config.yaml`).
380+
file (`stack.yaml`, by default) or its global configuration file
381+
(`config.yaml`).
381382

382383
~~~yaml
383384
nix:

doc/nonstandard_project_init.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Non-standard project initialization
44

55
You may need to configure Stack to work with an existing project that has one or
6-
more Cabal files but no Stack project-level configuration file (`stack.yaml`).
6+
more Cabal files but no Stack project-level configuration file (`stack.yaml`, by
7+
default).
78

89
## The `stack init` command
910

doc/path_command.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Pass the following flags for information about specific files or locations:
2222
|--compiler-bin |The directory containing the GHC executable. |
2323
|--compiler-exe |The GHC executable. |
2424
|--compiler-tools-bin |The directory containing binaries specific to a particular compiler.|
25-
|--config-location |Stack's project-level YAML configuration file (`stack.yaml`).|
25+
|--config-location |Stack's project-level YAML configuration file (`stack.yaml`, by default).|
2626
|--dist-dir |The dist work directory, relative to the package directory.|
2727
|--extra-include-dirs |Extra include directories. |
2828
|--extra-library-dirs |Extra library directories. |

doc/script_command.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ LTS Haskell 20.25, where considerations on Windows differ from non-Windows. The
138138
~~~
139139

140140
`acme-missiles` is not in the snapshot and so needs to be specified as an
141-
extra dep.
141+
extra-dep.
142142

143143
Stack can deduce that the module imports imply that the required packages
144144
are `acme-missiles`, `time` and `extra` (which is in the snapshot).
145145

146146
`extra` depends on `directory` and `process`. If `directory` and `process`
147-
are not specified as extra deps, Stack will complain that they have been
147+
are not specified as extra-deps, Stack will complain that they have been
148148
'pruned'.
149149

150150
`directory-1.3.6.2` depends on `time < 1.12`. If `time` is not specified as
151-
an extra dep, Stack will try to construct a build plan based on the latest
151+
an extra-dep, Stack will try to construct a build plan based on the latest
152152
version in the package index (which will fail, as the latest version is
153153
`>= 1.12`)
154154

@@ -168,7 +168,7 @@ LTS Haskell 20.25, where considerations on Windows differ from non-Windows. The
168168
~~~
169169

170170
`acme-missiles` is not in the snapshot and so needs to be specified as an
171-
extra dep.
171+
extra-dep.
172172

173173
Stack can deduce that the module imports imply that the required packages
174174
are `acme-missiles`, `time` and `extra` (which is in the snapshot).

doc/stack_yaml_vs_cabal_package_file.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ Stack defines a new concept called a _project_. A project has:
5050
* And a bunch more Stack configuration
5151

5252
Often you will have a project that defines only one local Cabal package that you
53-
are working on. If you need to specify an extra dependency, a source of
54-
confusion can be why you need to specify it both in the `stack.yaml` file _and_
53+
are working on. If you need to specify a dependency, a source of confusion can
54+
be why you need to specify it both in the `stack.yaml` file _and_
5555
in the Cabal file. To explain, let's take a quick detour to talk about snapshots
5656
and how Stack resolves dependencies.
5757

5858
## Snapshots and resolvers
5959

60-
Stack follows a rule that says, for any projects, there is precisely one version
60+
Stack follows a rule that says, for any project, there is precisely one version
6161
of each package available. Obviously, for many packages there are _many_
6262
versions available in the world. But when resolving a `stack.yaml` file, Stack
6363
requires that you have chosen a specific version for each package available.

0 commit comments

Comments
 (0)