-
Notifications
You must be signed in to change notification settings - Fork 131
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
Fix output truncation with json-errors and build failure. Fix #1160 #1199
Conversation
…ipt#1160 Problematic situation is when --json-errors is passed (output is one very long line printed out all at once), there are many warnings (json > 65536 bytes) and there is an error (spago should exit with an error code). Set the error code and allow control flow to naturally exit to allow output to be flushed.
Not clear why the test fails on windows only, I suspect something about trailing newline (I noticed there's some munging of that in the tests setup, and the output being single-line) |
And about the Windows failure in CI: the fixture contains a When fixtures contain paths we just keep a different one around just for Windows, e.g. see the tests for Lines 36 to 38 in ebb99a0
|
src/Spago/Command/Build.purs
Outdated
@@ -153,17 +151,20 @@ run opts = do | |||
let reportTest = pedanticPackages || (fromMaybe false $ p.package.test >>= _.pedantic_packages) | |||
Alternative.guard (reportSrc || reportTest) | |||
pure $ Tuple p { reportSrc, reportTest } | |||
unless (Array.null pedanticPkgs || opts.depsOnly) do | |||
if Array.null pedanticPkgs || opts.depsOnly then do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well this clearly wasn't it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be the other way around 😄
if Array.null pedanticPkgs || opts.depsOnly then do
pure true
else do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's what I meant by the comment but I still have 2 spago docs tests failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux CI is happy!
Problematic situation is when --json-errors is passed (output is one very long line printed out all at once), there are many warnings (json > 65536 bytes) and there is an error (spago should exit with an error code). Set the error code and allow control flow to naturally exit to allow output to be flushed.
Description of the change
TODO
Checklist:
README
P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊