[Haskell-cafe] [Haskell-community] technical thoughts on stack
code at funwithsoftware.org
Thu Sep 15 05:25:05 UTC 2016
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.
> 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.
> 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.
More information about the Haskell-Cafe