purescript-contrib / pulp

A build tool for PureScript projects
GNU Lesser General Public License v3.0
443 stars 86 forks source link

How does `--monochrome` work? #367

Open i-am-the-slime opened 5 years ago

i-am-the-slime commented 5 years ago

If I specify pulp --monochrome build my output is still coloured. Am I doing something wrong? I'm on macOS with pulp version 12.3.1.

hdgarrood commented 5 years ago

It might be that pulp is invoking a subprocess but failing to pass on the message that it should not use coloured output. Can you share the command you used, and the output you got?

i-am-the-slime commented 5 years ago

I use pulp --monochrome build. From within fish shell. I thought that might be related but I tried from bash and still got colours.

hdgarrood commented 5 years ago

Is the coloured output coming from the compiler itself? I think what might have happened here is that the --monochrome option in pulp was implemented before the compiler started using colour codes in its output, and that when the compiler did start using colour codes in its output, nobody noticed that this is violating people's expectations about what --monochrome will do.

nwolverson commented 4 years ago

Looks like --monochrome was piped to psa, but not purs (and certainly I recall psa as colourful) - so if you're using psa, that should be taken care of.

I saw when colour was added to the compiler there was a suggestion to support --monochrome there that doesn't seem to be realised: https://github.com/purescript/purescript/pull/2079#issuecomment-222195388