@@ -247,22 +247,51 @@ the `--watch-all` flag.
247247
248248Default: Enabled
249249
250- Set the flag to have the output of all packages being built scroll by in a
251- streaming fashion. The output from each package built will be prefixed by the
252- package name, e.g. ` mtl> Building ... ` . This will include the output from
253- dependencies being built, not just targets.
254-
255- Unset the flag to disable this behaviour. When disabled:
256-
257- * When building a single target package (e.g., ` stack build ` in a project
258- with only one package, or ` stack build <package_name> ` in a multi-package
259- project), the build output from GHC will be hidden for building all
260- dependencies, and will be displayed for the one target package.
261- * By default, when building multiple target packages, the output from these
262- will end up in a log file instead of on the console unless it contains
263- errors or warnings, to avoid problems of interleaved output and decrease
264- console noise. If you would like to see this content instead, you can use
265- the ` dump-logs ` option.
250+ Set the flag for interleaved output. With interleaved output, each line of
251+ output from each package being built (targets and dependencies) is sent to the
252+ console as it happens and output relating to different packages can be
253+ interleaved. Each line will be prefixed with the name of the relevant package.
254+ The spacing between the prefix and the output will be set based on the longest
255+ relevant package name, so that the start of the output itself aligns. For
256+ example (extract):
257+
258+ ~~~ text
259+ hpack > build
260+ mustache > configure
261+ hpack > Preprocessing library for hpack-0.35.0..
262+ hpack > Building library for hpack-0.35.0..
263+ mustache > Configuring mustache-2.4.1...
264+ hpack > [ 1 of 29] Compiling Data.Aeson.Config.Key
265+ hpack > [ 2 of 29] Compiling Data.Aeson.Config.KeyMap
266+ mustache > build
267+ hpack > [ 3 of 29] Compiling Data.Aeson.Config.Util
268+ mustache > Preprocessing library for mustache-2.4.1..
269+ mustache > Building library for mustache-2.4.1..
270+ hpack > [ 4 of 29] Compiling Hpack.Haskell
271+ hpack > [ 5 of 29] Compiling Hpack.Utf8
272+ mustache > [1 of 8] Compiling Paths_mustache
273+ hpack > [ 6 of 29] Compiling Imports
274+ hpack > [ 7 of 29] Compiling Hpack.Util
275+ mustache > [2 of 8] Compiling Text.Mustache.Internal
276+ ~~~
277+
278+ Unset the flag for non-interleaved output. With non-interleaved output, the
279+ build output from GHC (as opposed to from Stack) in respect of dependencies is
280+ ignored. The behaviour then depends whether there is one target package or more
281+ than one. There can be one target if the project has a single package or if one
282+ package is targetted in a multi-package project (for example, using
283+ ` stack build <package_name> ` ).
284+
285+ * ** One target package:** The build output for the target package is sent to the
286+ console as it happens.
287+
288+ * ** More than one target package:** The build output from GHC
289+ (as opposed to from Stack) for each target package is sent to a log file for
290+ that package, unless it contains warnings or errors. At the end of the build,
291+ the location of the directory containing the log files is reported. To also
292+ output the contents of the log files to the console at the end of the build,
293+ use Stack's ` dump-logs ` option. For further information about that option, see
294+ the [ YAML configuration] ( yaml_configuration.md#dump-logs ) documentation.
266295
267296### The ` stack build --pedantic ` flag
268297
0 commit comments