diff --git a/.azure/azure-linux-template.yml b/.azure/azure-linux-template.yml index 6d9dbe47b0be76a53794a1c352d40c783c412272..6e5f4eb03111bd93205fd42e06b41fffd0c59e50 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 08c6b24c0a066fb8ae370d7e1c33c97fd81d5dfa..a0943721593f23c7a0c498c91013a2b52c765560 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 2be76cd38e3d0cb5cbfe983a329e23f71a91dc22..7902da168d59f7d70616076c14d6472fd3ce13cc 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 7ebdaee9c3f97b5bc1a76a99f07f0f79b546071a..46632811fa4f300318beba29f7d9a27a2840389b 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 b22b9ed01f6ddc348660f369819cc3427569488a..295bcffceafb1ef4d0a6d608365692b566e5d186 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 61d85f7c8d58a8013dfa803290a27d9689104654..787616113104540d942775231c6a950637ae3033 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 f88fe9844ae8b7de8b206d1e5417ab4cc8029ae2..95d4384f341c128707eb82979856ce98df0065b9 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