-
Notifications
You must be signed in to change notification settings - Fork 697
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
Don't output haddock stdout if verbosity is silent #7483
base: master
Are you sure you want to change the base?
Conversation
I think this is perfectly acceptable, but a comment to that effect by the relevant code would be nice. |
Documentation is necessary, but I am unsure where. Documenting it in the code seems to me not ideal, as most people won't read the code (it took me 3 years to reach that code-path). Maybe we should document in the user-guide/reference? Edited such that the comment is not repellent any more |
OK, I will shut up and let you decide how to document it. |
@Mikolaj My apologies, I did not mean it like that! I meant, I was thinking on how to document it properly and did not mean to disregard your comment! It needs to be documented, I am just not sure how. |
No problem at all. Is that really a user-facing feature? Isn't text on stderr with no error exit code a pathology? If so, I wouldn't worry. But I may be missing something, e.g., haddock calling some tool, which exits printing error message that the user should see even though haddock carries on? |
Oh I have no idea. But it is sure to break someones workflow |
Right. Given that, a changelog entry wouldn't hurt, just in case. |
Actually, I've just tested and haddock prints (some) warnings to stderr, e.g., "Warning: The documentation for the following packages are not installed.". |
All other warnings seem to be printed to stdout. That's probably wrong in itself, but perhaps also may influence this PR. |
I don't mind polluting stdout in #7478 as we have the file output option. Maybe we can raise some bug reports in Haddock itself. |
5cfdb14
to
447c5e7
Compare
incredible, now I am forced to boot into windows to understand why this fails on windows >_> |
447c5e7
to
0a1dec8
Compare
@mergify rebase |
❌ Base branch update has failedGit reported the following error:
err-code: DE066 |
It's a pity this has been languished. @fendor do you by any chance have energy to bring it over the line? There's one approval already, so that makes it really close. I think minor annoyances around stderr and Haddock failures are not as important. |
@ulysses4ever Unfortunately, not likely at the moment. I have no use-case for it and if I have time to work on cabal related PRs, it will be #7500, since I expect it to help cabal and HLS to operate much better together, which I do have a use-case for. |
Marking this PR as draft 🙂 |
Extracted from #7478
Basically, if verbosity is
silent
, don't output haddock tostdout
.As a non-ideal sideeffect, stderr output is swallowed if
haddock
has a zero-exit code.Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!