Skip to content

Updated warning message to output on stderr - #8396

Merged
andreasabel merged 3 commits into
haskell:masterfrom
SaadAhmedGit:patch-1
Aug 28, 2022
Merged

andreasabel merged 3 commits into
haskell:masterfrom
SaadAhmedGit:patch-1

Conversation

@SaadAhmedGit

@SaadAhmedGit SaadAhmedGit commented Aug 18, 2022 •

Copy link
Copy Markdown
Contributor

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!

@andreasabel andreasabel left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

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

@ulysses4ever ulysses4ever left a comment

Copy link
Copy Markdown
Collaborator

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

Mikolaj commented Aug 22, 2022

Copy link
Copy Markdown
Member

@mergify refresh

@mergify

mergify Bot commented Aug 22, 2022

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

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

Mikolaj commented Aug 22, 2022

Copy link
Copy Markdown
Member

@mergify refresh

@mergify

mergify Bot commented Aug 22, 2022

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@Mikolaj

Mikolaj commented Aug 22, 2022

Copy link
Copy Markdown
Member

@mergify rebase

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

mergify Bot commented Aug 22, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Mikolaj commented Aug 23, 2022

Copy link
Copy Markdown
Member

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

ulysses4ever commented Aug 23, 2022 •

Copy link
Copy Markdown
Collaborator

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

andreasabel commented Aug 24, 2022 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

@andreasabel

Q: Is me commenting here also delaying the merge?

Correct.

@ulysses4ever

Copy link
Copy Markdown
Collaborator

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

@athas athas left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

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

@ulysses4ever

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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