From 1ff91d48f13a6238d86a4ecb44900ee705d017c3 Mon Sep 17 00:00:00 2001
From: Emanuel Borsboom <manny@fpcomplete.com>
Date: Thu, 11 Jul 2019 09:57:19 -0700
Subject: [PATCH] Update docs and CI scripts to reflect interleaved-output
 enabled by default

---
 .azure/azure-linux-template.yml   |  4 ++--
 .azure/azure-osx-template.yml     |  4 ++--
 .azure/azure-windows-template.yml |  2 +-
 CONTRIBUTING.md                   |  4 ++--
 doc/build_command.md              | 35 +++++++++++++++++--------------
 etc/scripts/integration-tests.sh  |  2 +-
 test/integration/README.md        |  2 +-
 7 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/.azure/azure-linux-template.yml b/.azure/azure-linux-template.yml
index 6d9dbe47b..6e5f4eb03 100644
--- a/.azure/azure-linux-template.yml
+++ b/.azure/azure-linux-template.yml
@@ -56,7 +56,7 @@ jobs:
           ;;
         *)
           export PATH=$HOME/.local/bin:$PATH
-          stack --install-ghc $ARGS test --bench --only-dependencies --interleaved-output
+          stack --install-ghc $ARGS test --bench --only-dependencies
           ;;
       esac
       GHC_OPTIONS="-Werror"
@@ -69,7 +69,7 @@ jobs:
           hlint test/ --cpp-simple
           ;;
         stack)
-          stack test --haddock --no-haddock-deps --ghc-options="$GHC_OPTIONS" --interleaved-output
+          stack test --haddock --no-haddock-deps --ghc-options="$GHC_OPTIONS"
           ;;
         pedantic)
           stack --system-ghc build --pedantic
diff --git a/.azure/azure-osx-template.yml b/.azure/azure-osx-template.yml
index 08c6b24c0..a09437215 100644
--- a/.azure/azure-osx-template.yml
+++ b/.azure/azure-osx-template.yml
@@ -25,8 +25,8 @@ jobs:
       brew install mercurial
       export PATH=$HOME/.local/bin:$PATH
       set -ex
-      stack --install-ghc $ARGS test --bench --only-dependencies --interleaved-output
-      stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --interleaved-output
+      stack --install-ghc $ARGS test --bench --only-dependencies
+      stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
       set +ex
     env:
       OS_NAME: ${{ parameters.os }}
diff --git a/.azure/azure-windows-template.yml b/.azure/azure-windows-template.yml
index 2be76cd38..7902da168 100644
--- a/.azure/azure-windows-template.yml
+++ b/.azure/azure-windows-template.yml
@@ -32,7 +32,7 @@ jobs:
       curl -sSkL http://www.stackage.org/stack/windows-i386 -o /usr/bin/stack.zip
       unzip -o /usr/bin/stack.zip -d /usr/bin/
       stack setup
-      stack test --jobs 1 --interleaved-output
+      stack test --jobs 1
     env:
       OS_NAME: ${{ parameters.os }}
     displayName: 'Installation ${{parameters.os}}'
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7ebdaee9c..46632811f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -135,13 +135,13 @@ Where again, `<PATTERN>` is the name of the module without `Spec.hs`.
 Running the integration tests is a little involved, you'll need to:
 
 ```bash
-$ stack build --flag stack:integration-tests stack --interleaved-output --exec stack-integration-test
+$ stack build --flag stack:integration-tests stack --exec stack-integration-test
 ```
 
 Running an individual module works like this:
 
 ```bash
-$ stack build --flag stack:integration-tests stack --interleaved-output --exec "stack-integration-test -m <PATTERN>"
+$ stack build --flag stack:integration-tests stack --exec "stack-integration-test -m <PATTERN>"
 ```
 
 Where `<PATTERN>` is the name of the folder listed in the
diff --git a/doc/build_command.md b/doc/build_command.md
index b22b9ed01..295bcffce 100644
--- a/doc/build_command.md
+++ b/doc/build_command.md
@@ -184,19 +184,22 @@ This command will:
 
 ## Build output
 
-When building a single target package (e.g., `stack build` in a project with
-only one package, or `stack build package-name` in a multi-package project),
-the build output from GHC will be hidden for building all dependencies, and
-will be displayed for the one target package.
-
-By default, when building multiple target packages, the output from these will
-end up in a log file instead of on the console unless it contains errors or
-warnings, to avoid problems of interleaved output and decrease console noise.
-If you would like to see this content instead, you can use the `--dump-logs`
-command line option, or add `dump-logs: all` to your `stack.yaml` file.
-
-Alternatively, starting with Stack 1.8, you can pass `--interleaved-output` to
-see output of all packages being built scroll by in a streaming fashion. The
-output from each package built will be prefixed by the package name, e.g. `mtl>
-Building ...`. Note that, unlike the default output, this will include the
-output from dependencies being built, not just targets.
+Starting with Stack 2.1, output of all packages being built scrolls by in a
+streaming fashion. The output from each package built will be prefixed by the
+package name, e.g. `mtl> Building ...`. This will include the output from
+dependencies being built, not just targets.
+
+To disable this behaviour, you can pass `--no-interleaved-output`, or add
+`interleaved-output: false` to your `stack.yaml` file.  When disabled:
+
+  * When building a single target package (e.g., `stack build` in a project
+    with only one package, or `stack build package-name` in a multi-package
+    project), the build output from GHC will be hidden for building all
+    dependencies, and will be displayed for the one target package.
+
+  * By default, when building multiple target packages, the output from these
+    will end up in a log file instead of on the console unless it contains
+    errors or warnings, to avoid problems of interleaved output and decrease
+    console noise. If you would like to see this content instead, you can use
+    the `--dump-logs` command line option, or add `dump-logs: all` to your
+    `stack.yaml` file.
diff --git a/etc/scripts/integration-tests.sh b/etc/scripts/integration-tests.sh
index 61d85f7c8..787616113 100755
--- a/etc/scripts/integration-tests.sh
+++ b/etc/scripts/integration-tests.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec stack build --flag stack:integration-tests stack --interleaved-output --exec stack-integration-test
+exec stack build --flag stack:integration-tests stack --exec stack-integration-test
diff --git a/test/integration/README.md b/test/integration/README.md
index f88fe9844..95d4384f3 100644
--- a/test/integration/README.md
+++ b/test/integration/README.md
@@ -23,7 +23,7 @@ One simple way to run a single test is:
 A more thorough way to run the tests is with
 
 ```shell
-$ stack build --flag stack:integration-tests stack --interleaved-output --exec stack-integration-test
+$ stack build --flag stack:integration-tests stack --exec stack-integration-test
 ```
 
 Note that this command can take a _long_ time. It's also more thorough
-- 
GitLab