Skip to content

Commit 5f4e324

Browse files
committed
Re commercialhaskell#6564 Further improve --flag documentation
1 parent 2a41f67 commit 5f4e324

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

doc/build_command.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ specified Cabal flag for the specified package. Stack will report an error if:
251251

252252
This overrides:
253253

254+
* any Cabal flag specifications for the package in the snapshot;
255+
254256
* any Cabal flag specifications for the package in Stack's project-level
255257
configuration file (`stack.yaml`); and
256258

@@ -260,8 +262,19 @@ This overrides:
260262
for all packages (project packages and dependencies) (whether or not a flag of
261263
that name is a flag of the package).
262264

263-
This overrides any Cabal flag specifications for packages in Stack's
264-
project-level configuration file (`stack.yaml`).
265+
This overrides:
266+
267+
* any Cabal flag specifications for packages in the snapshot; and
268+
269+
* any Cabal flag specifications for packages in Stack's project-level
270+
configuration file (`stack.yaml`).
271+
272+
!!! note
273+
274+
For a package included directly in the snapshot, if the Cabal flag
275+
specifications differ from the Cabal flag specifications (if any) in the
276+
snapshot, then the package will automatically be promoted to be an
277+
[extra-dep](#extra-deps).
265278

266279
!!! note
267280

@@ -271,9 +284,9 @@ project-level configuration file (`stack.yaml`).
271284
!!! warning
272285

273286
Stack creates snapshots when building immutable dependencies of projects.
274-
The names of Cabal flags that have been set manually as disabled distinguish
275-
one such snapshot from another. However, the names of Cabal flags that have
276-
been set manually as enabled do not do so.
287+
The names of Cabal flags that have been unset manually distinguish one such
288+
snapshot from another. However, the names of Cabal flags that have been set
289+
manually do not do so.
277290

278291
### `--[no-]force-dirty` flag
279292

doc/yaml_configuration.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,15 @@ flags:
307307
flag-name: true
308308
~~~
309309

310-
If a specified Cabal flag for a package included directly in a snapshot is
311-
different to the Cabal flag specified for that package in the snapshot, then the
312-
package will automatically be promoted to be an [extra-dep](#extra-deps).
310+
This overrides all Cabal flag specifications (if any) for the specified packages
311+
in the snapshot.
312+
313+
!!! note
314+
315+
For a package included directly in the snapshot, if the Cabal flag
316+
specifications differ from the Cabal flag specifications (if any) in the
317+
snapshot, then the package will automatically be promoted to be an
318+
[extra-dep](#extra-deps).
313319

314320
!!! note
315321

@@ -319,9 +325,9 @@ package will automatically be promoted to be an [extra-dep](#extra-deps).
319325
!!! warning
320326

321327
Stack creates snapshots when building immutable dependencies of projects.
322-
The names of Cabal flags that have been set manually as disabled distinguish
323-
one such snapshot from another. However, the names of Cabal flags that have
324-
been set manually as enabled do not do so.
328+
The names of Cabal flags that have been unset manually distinguish one such
329+
snapshot from another. However, the names of Cabal flags that have been set
330+
manually do not do so.
325331

326332
### drop-packages
327333

0 commit comments

Comments
 (0)