Skip to content
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

Updated warning message to output on stderr #8396

Merged
merged 3 commits into from
Aug 28, 2022
Merged

Updated warning message to output on stderr #8396

merged 3 commits into from
Aug 28, 2022

Conversation

SaadAhmedGit
Copy link
Contributor

@SaadAhmedGit SaadAhmedGit commented Aug 18, 2022

This Fixes #8393
The message warning about assertions being enabled was previously being output to the stdout stream rather than stderr.


Please include the following checklist in your PR:

Please also shortly describe how you tested your change. Bonus points for added tests!

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

If I infer the intentions of previous cabal developers correctly, there shouldn't be any naked putStr calls ever, but output should be channeled through one of the service functions given here:

warn,
notice, noticeNoWrap, noticeDoc,
setupMessage,
info, infoNoWrap,

I suppose warn would be what we want here, and warnIfAssertionsAreEnabled then needs a Verbosity argument.

@ulysses4ever
Copy link
Collaborator

There's a similar PR right next door: #7838. Maybe you want to pick it up?

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! The big stderr switch will have to wait for another day, I guess…

@andreasabel andreasabel added squash+merge me Tell Mergify Bot to squash-merge re: warnings Concerning warnings printed by cabal labels Aug 19, 2022
@Mikolaj
Copy link
Member

Mikolaj commented Aug 22, 2022

@mergify refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2022

refresh

✅ Pull request refreshed

@Mikolaj Mikolaj removed the squash+merge me Tell Mergify Bot to squash-merge label Aug 22, 2022
@Mikolaj
Copy link
Member

Mikolaj commented Aug 22, 2022

@mergify refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2022

refresh

✅ Pull request refreshed

@Mikolaj
Copy link
Member

Mikolaj commented Aug 22, 2022

@mergify rebase

This Fixes #8393
The message warning about assertions being enabled was previously being output to the stdout stream rather than stderr.
@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2022

rebase

✅ Branch has been successfully rebased

@Mikolaj Mikolaj added the squash+merge me Tell Mergify Bot to squash-merge label Aug 22, 2022
@andreasabel
Copy link
Member

Weird, I commanded "squash + merge me" 4 days ago, but it still isn't merged. I thought the waiting period was 2 days. Is the Mergify way of merging brittle? Should we go back to hit the button manually?

@Mikolaj
Copy link
Member

Mikolaj commented Aug 23, 2022

The waiting period probably resets sometimes. I hope not at every manual rebase, but it's possible. As you can see I struggled with broken CI, fixed it, the merge queue was still blocked, so I rebased manually a few times, etc. Last time 2 days ago.

Merging delay is brittle whenever CI is broken.

@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Aug 23, 2022

Last events I see (before your comments today):

jneira force-pushed the patch-1 branch from 5f395e6 to 0a01a22 2 days ago
Mikolaj added the squash+merge me label 2 days ago

When pointing "2 days ago" with the mouse, I see the exact time and it's less than 48 hours, so I don't see a problem.

I was thinking about this whole system, and I think what makes it take longer are concurrent merges during the 48 hours windows. Because Mergify has to rebase in that case, and that probably qualifies for a timer reset. Also, manual merges probably makes the queue of "law-abiding" (2-day rule preserving) merges to starve (also because of rebase).

It'd be nice to say: merge 2 days after last "significant" event, rather than any event, but that doesn't seem to be possible.

@andreasabel
Copy link
Member

andreasabel commented Aug 24, 2022

It'd be nice to say: merge 2 days after last "significant" event, rather than any event, but that doesn't seem to be possible.

Yes, I think the clock should start ticking once the yellow "merge me" label is set. If one wants to halt the merge process, one would remove that label again.
I suppose the API may not support this; I wonder if/hpw one could report this upstream to Mergify...

Q: Is me commenting here also delaying the merge?

@ulysses4ever
Copy link
Collaborator

@andreasabel

Q: Is me commenting here also delaying the merge?

Correct.

@ulysses4ever
Copy link
Collaborator

I submitted an issue against Mergify tracker about the spurious delays: Mergifyio/mergify#5036 Feel free to pitch in.

Copy link
Collaborator

@athas athas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my understanding of the code base, this is correct.

@SaadAhmedGit
Copy link
Contributor Author

Looks like mergify has cancelled putting this PR on squash+merge queue

@ulysses4ever
Copy link
Collaborator

It looks fine to me so far. The 2-day timer was reset by the last rebase 9 hours ago (and our comments after that), so we'll have to wait. Unless someone wants to take a liberty and merge it manually.

@andreasabel andreasabel merged commit 58c46d5 into haskell:master Aug 28, 2022
@andreasabel
Copy link
Member

Unless someone wants to take a liberty and merge it manually.

Yes, me.
I am loosing patience with the Mergify procrastinator.

@andreasabel
Copy link
Member

Having been hit by

I regret that I requested changes to @SaadAhmedGit 's original fix. The problem is that the warn machinery does not work at this point where command line options are not passed, so it cannot be silenced with -v0. So vanilla printing to stderr would have been better. I'll open a new PR.

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days re: warnings Concerning warnings printed by cabal squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Warning: ... assertions enabled" should go to stderr, not stdout
5 participants