Skip to content

Make stack path output independent of logging. (Issue #604) - #615

Merged
mgsloan merged 3 commits into
commercialhaskell:masterfrom
GaloisInc:master
Jul 17, 2015
Merged

mgsloan merged 3 commits into
commercialhaskell:masterfrom
GaloisInc:master

Conversation

@ntc2

@ntc2 ntc2 commented Jul 16, 2015

Copy link
Copy Markdown
Contributor

E.g.

$ (export STACK_YAML=stack.yaml && stack path --local-install-root)
Getting project config file from STACK_YAML environment
/home/conathan/Desktop/mirrored/stack-fix/stack.git/.stack-work/install/x86_64-linux/lts-2.17/7.8.4

$ (export STACK_YAML=stack.yaml && stack --verbosity silent path --local-install-root)
/home/conathan/Desktop/mirrored/stack-fix/stack.git/.stack-work/install/x86_64-linux/lts-2.17/7.8.4

but I still think it's a good idea to also send log messages to stderr.

ntc2 added 2 commits July 16, 2015 16:23
…kell#604)

E.g.

    $ (export STACK_YAML=stack.yaml && stack path --local-install-root)
    Getting project config file from STACK_YAML environment
    /home/conathan/Desktop/mirrored/stack-fix/stack.git/.stack-work/install/x86_64-linux/lts-2.17/7.8.4

    $ (export STACK_YAML=stack.yaml && stack --verbosity silent path --local-install-root)
    /home/conathan/Desktop/mirrored/stack-fix/stack.git/.stack-work/install/x86_64-linux/lts-2.17/7.8.4

but I still think it's a good idea to also send log messages to stderr.
…lhaskell#446)

This is probably controversial. My motivation is that output from
commands like `stack path --local-install-root` should be consumable
by scripts, and so shouldn't be cluttered with unpredictable log
messages. There is probably some good reason that non-error/warning
log output was still going to stdout in
4460c36, but it's not explained in
@mgsloan

mgsloan commented Jul 17, 2015

Copy link
Copy Markdown
Contributor

Looks good so far! Only issue is that this will break stack dot. Could you please update it with some putStrLns? https://github.com/commercialhaskell/stack/blob/master/src/Stack/Dot.hs

…ell#604)

In c42b46c I changed all log messages
to go to stderr, but this messed up `stack dot` because it used
logging to produce its output.
@ntc2

ntc2 commented Jul 17, 2015

Copy link
Copy Markdown
Contributor Author

@mgsloan: I added the putStrLns to stack dot.

@mgsloan

mgsloan commented Jul 17, 2015

Copy link
Copy Markdown
Contributor

@ntc2: Thanks, looks good to me!

mgsloan added a commit that referenced this pull request Jul 17, 2015
Make `stack path` output independent of logging. (Issue #604)
@mgsloan
mgsloan merged commit 972f1fa into commercialhaskell:master Jul 17, 2015
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.

2 participants