-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Squelched warning output when building multiple packages #2545
Comments
Thanks for the report. In that scenario stack should silence warnings for the external dependencies, but this seems* to overreach. Technically, my first guess is: is this code the culprit? console = wanted
&& all (\(ActionId ident _) -> ident == taskProvides) (Set.toList acRemaining)
&& eeTotalWanted == 1 |
I was able to reproduce this also - even without the "location" qualifier on one of the projects. test:
|
The #426 ( |
#426 is a bit different, in that it wants a realtime indication of progress. It seems to be stuck in concerns about interleaved output. The problem with warnings (this bug) could be solved by waiting for the build to finish, and then dumping the log files to stderr for all local packages that were built. |
Also of note: I've opened up #2596, which ensures that local extra-dep packages are in fact treated as dependencies for both purposes of |
@snoyberg: perhaps what you did in #2596 could be adapted to fully solve this issue by having default behaviour that detects any warnings in the logfile and dump it if any are found. We already have some code to detect warnings in GHC output in order to make displayed file paths absolute. At least, I think that would be desirable default behaviour. Any other opinions here? |
I think #2596 should be treated as an orthogonal bug fix which restores correct behavior for dependency vs non-dependency packages. I'd actually consider this closer to the behavior change being done in #2594, and it sounds like we could have three settings of dumping logs:
It would certainly be easy to extend the dump-logs code I already wrote to account for this. |
[reopened since warning output is still "squelched" by default when building multiple packages] |
Hi All,
Warning output is squelched when referring to external locations. Warning output is produced on the console when
-Werror
is present. The following pair of projects demonstrates the problem on the latest version ofstack
(1.1.2).STACK_TEST.zip
This pair of projects was produced and tested with the following sequence of actions.
Check your stack version.
Create two new projects.
Edit the
stack.yaml
file instacktest
to match the following.Edit
src/Lib.hs
instacktest
to match the following.Edit
stacktest.cabal
to resemble the following. Of note is theghc-options
line.EXPECTED: two warnings in the build output of
src/Lib.hs
when buildingstacktest
.ACTUAL: no warning output is emitted.
Further notes.
The warnings are still present in the log files, but no indications that warnings exist in the build are present on the console.
Furthermore, turning on
-Werror
produces the warning output as expected, but is sometimes awkward when doing large refactors.This behavior does not appear to exist when using
extra-deps
without a package in some other location as specified by alocation
directive.The text was updated successfully, but these errors were encountered: