Skip to content

Commit 3d15178

Browse files
committed
Merge branch 'stable'
2 parents 6e31608 + c60c016 commit 3d15178

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

doc/build_command.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ The same Cabal flag name can be set (or unset) for multiple packages (at the
198198
command line only) with:
199199

200200
~~~text
201-
stack build --flag *:[-]<flag)name>
201+
stack build --flag *:[-]<flag_name>
202202
~~~
203203

204204
!!! note
@@ -555,14 +555,15 @@ package is targetted in a multi-package project (for example, using
555555
`stack build <package_name>`).
556556

557557
* **One target package:** The build output for the target package is sent to the
558-
console as it happens.
558+
standard error output stream of the console as it happens.
559559

560560
* **More than one target package:** The build output from GHC (as opposed to
561561
from Stack) for each target package is sent to a log file for that package,
562-
unless an error occurs. At the end of the build, the location of the directory
563-
containing the log files is reported. To also output the contents of the log
564-
files to the console at the end of the build, use Stack's `dump-logs` option.
565-
For further information about that option, see the
562+
unless an error occurs that prevents that. At the end of the build, the
563+
location of the directory containing the log files is reported. To also output
564+
the contents of the log files to the standard error output stream of the
565+
console at the end of the build, use Stack's `dump-logs` option. For further
566+
information about that option, see the
566567
[YAML configuration](yaml_configuration.md#dump-logs) documentation. The
567568
default `dump-logs` mode is to output the contents of the log files that are
568569
warnings.

doc/yaml_configuration.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,12 +791,13 @@ Command line equivalent (takes precedence): `--[no-]dump-logs` flag
791791

792792
In the case of *non-interleaved* output and *more than one* target package,
793793
Stack sends the build output from GHC for each target package to a log file,
794-
unless an error occurs. For further information, see the
795-
[`stack build --[no-]interleaved-output` flag](build_command.md#the-stack-build---no-interleaved-output-flag)
794+
unless an error occurs that prevents that. For further information, see the
795+
[`stack build --[no-]interleaved-output` flag](build_command.md#-no-interleaved-output-flag)
796796
documentation.
797797

798798
The value of the `dump-logs` key controls what, if any, log file content is sent
799-
('dumped') to the console at the end of the build. Possible values are:
799+
('dumped') to the standard error output stream of the console at the end of the
800+
build. Possible values are:
800801

801802
~~~yaml
802803
dump-logs: none # don't dump the content of any log files
@@ -807,6 +808,15 @@ dump-logs: all # dump all of the content of log files
807808
At the command line, `--no-dump-logs` is equivalent to `dump-logs: none` and
808809
`--dump-logs` is equivalent to `dump-logs: all`.
809810

811+
If GHC reports an error during the build and a log file is created, that build
812+
output will be included in the log file. Stack will also report errors during
813+
building to the standard error output stream. That stream can be piped to a
814+
file. For example, for a file named `stderr.log`:
815+
816+
~~~text
817+
stack --no-dump-logs --color always build --no-interleaved-output 2> stderr.log
818+
~~~
819+
810820
### extra-include-dirs
811821

812822
Default: `[]`

0 commit comments

Comments
 (0)