
On Thu, Sep 15, 2016 at 8:25 AM, Patrick Pelletier wrote: On 9/14/16 9:26 PM, Michael Snoyman wrote: I can give more technical details on warning output: it's purely an issue
of compromise between many different (and annoying) ways of displaying
things. Firstly, the behavior Chris Allen is commenting: if there is a
single local target package that you're building, then all of its GHC
output is displayed to the console, including warnings. AFAIK, this behavior is not clearly documented. I'd be happy to add a comment. Do you have a recommendation of somewhere to
put such an explanation that would make sense? 3. Save the output to a log file, and then display all of the log files to the user at the end, which would result in looking for a needle in a
haystack in many cases Is there any harm in having an option for this? If the number of local
packages is small (3 in my case) and there are not a huge number of
warnings, this still seems quite manageable. Perhaps a simple option to --dump-log-output, which at the end of a build
prints all logs from all local packages? That's certainly possible, though
I haven't touched that part of the code in quite a while. When I put together the initial code for running builds, I chose (1), which we still have today. It may be interesting to note that I did this
mostly based off of my experience with cabal-install doing the same thing
(whenever possible, I defaulted with cabal-install behavior, since it got
many things right, and regardless is what people were used to). I'm used to using "cabal sandbox add-source" to add dependencies that I
have locally checked out (e. g. because I've modified them, or because they
aren't released on Hackage yet). cabal doesn't printing warnings for those
dependencies, but it does always print warnings for the one package that
I'm working on. (The one in the current directory.) As far as I know, stack doesn't make a distinction between "the package
I'm working on now" and other dependencies which are checked out locally.
They all go in "packages" in the stack.yaml. So, although it's not an apples-to-apples comparison, it is different
behavior than I was getting with my cabal workflow. There is the extra-dep field in packages, but it wouldn't affect this
specific case. But really, the way you tell Stack "the package I'm working
on now" is by specifying it as a target on the command line, which _does_
work: `stack build http-client-tls` in my example above does in fact
display the output on the console.
Thanks for the feedback.
Michael