Skip to content

Conversation

@snoyberg
Copy link
Contributor

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

Manual experimentation only, sorry.

@snoyberg
Copy link
Contributor Author

Note that there are some subtle UX choices to be made in withOutputType, such as:

  • Do we dump output from non-local packages? Currently, YES
  • If we're just building a single package, do we still prefix output? Currently, YES

These are easy changes to make in the code, it's really a design issue. And I'd rather get the design right the first time around, so bikeshed away.

@snoyberg snoyberg force-pushed the 3225-output-to-stdout branch from 5b4a683 to b532cc8 Compare June 19, 2018 13:50
@mgsloan
Copy link
Contributor

mgsloan commented Jun 19, 2018

LGTM! 👍 👍

To me it seems consistent to dump output for non-local and single packages with this flag set. It would be good to have a way of suppressing such output for non-project packages, though, since the user does not have direct control over resolving errors / what is included in the output.

Copy link
Collaborator

@nh2 nh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and works well!

I've also tested the following:

  • .stack-work/install/x86_64-linux/lts-11.6/8.2.2/bin/stack --stack-root $PWD/tmpstackroot --work-dir tmpworkdir build lens --interleaved-output
  • equivalent stack install
  • running with 2>&1
  • redirecting with tee and 2>outfile

ChangeLog.md Outdated
the resulting tarball to the specified directory.
* Introduced the `--interleaved-output` command line option and
`build.interleaved-output` config value which causes multiple concurrent
builds to dump to stdout at the same time with a `packagename> ` prefix. See
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have observed it to dump to stderr instead of stdout.

@nh2
Copy link
Collaborator

nh2 commented Jun 20, 2018

Do we dump output from non-local packages? Currently, YES
If we're just building a single package, do we still prefix output? Currently, YES

These look like good choices to me.

Copy link
Collaborator

@nh2 nh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also want to update

https://github.com/commercialhaskell/stack/blob/b532cc8dc9bea7ad07aa26a608d7f877fffe75db/doc/build_command.md#build-output

the section that still says

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.

For example with

Alternatively, you can pass `--interleaved-output` to see output of all packages being built scroll by in a streaming fashion.

@snoyberg
Copy link
Contributor Author

Good catches @nh2, I think 4e6b247 should address both points. Holler if not, otherwise we can merge this once CI passes.

@snoyberg snoyberg merged commit d2031db into master Jun 21, 2018
@snoyberg snoyberg deleted the 3225-output-to-stdout branch June 21, 2018 05:36
@buggymcbugfix
Copy link

Why does adding interleaved-output: true to my stack.yaml not work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report progress on STDOUT/STDERR during compilation of individual modules Add flag to print GHC output to stdout

5 participants