Skip to content

Refactor notice, info and debug functions - #12024

Merged
mergify[bot] merged 1 commit into
haskell:masterfrom
cabalism:refactor/notice-info-debug-messages
Jul 26, 2026
Merged

Refactor notice, info and debug functions#12024
mergify[bot] merged 1 commit into
haskell:masterfrom
cabalism:refactor/notice-info-debug-messages

Conversation

@philderbeast

Copy link
Copy Markdown
Collaborator

Refactor notice, info and debug and the matching *NoWrap functions to share a common implementation.

Note

hFlush stdout is always called but shouldn't that be hFlush h? This is a separate issue, #11899.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@Bodigrim

Bodigrim commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Sorry for nitpicking, but perhaps the PR title can be edited, like "Refactor notice, info and debug functions". I've been confused what it means until I looked inside.

@philderbeast philderbeast changed the title Refactor notice info debug message functions Refactor notice, info and debug functions Jul 5, 2026
@philderbeast
philderbeast force-pushed the refactor/notice-info-debug-messages branch 2 times, most recently from e3d107c to 698924f Compare July 5, 2026 12:36
@philderbeast
philderbeast force-pushed the refactor/notice-info-debug-messages branch from 698924f to 1c2da84 Compare July 6, 2026 19:01
@philderbeast
philderbeast force-pushed the refactor/notice-info-debug-messages branch from 1c2da84 to 97dd468 Compare July 16, 2026 14:05
@philderbeast

Copy link
Copy Markdown
Collaborator Author

After rebasing, this approved pull request failed to compile1. I got it compiling again but then saw an opportunity to reduce duplication even more so I'm re-requesting reviews. The post-approval changes are in the last 3 commits.

Footnotes

  1. I've got a simple reproducer for this problem that involves withFrozenCallStack. I'll follow up on this separately once I understand it more.

@Mikolaj Mikolaj 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.

Well done!

@philderbeast
philderbeast force-pushed the refactor/notice-info-debug-messages branch from 96fad8a to 258ca7f Compare July 23, 2026 19:19
@philderbeast philderbeast added the merge me Tell Mergify Bot to merge label Jul 23, 2026
- Refactor info and infoNoWrap
- Refactor debug and debugNoWrap
- Implement logMsg with logMsgNoWrap
- Rename logMsg to logMsgWrap
- Rename logMsgNoWrap to logMsg
- Use -XViewPatterns for handle, not flags
- Implement noticeDoc with logMsg
- Remove unnecessary $
- Move withFrozenCallStack to logMsg
- Add ifLevelLogMsg*
- Use when instead of top-level guard
@philderbeast
philderbeast force-pushed the refactor/notice-info-debug-messages branch from 258ca7f to bfd3b78 Compare July 23, 2026 19:20
@mergify mergify Bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Jul 23, 2026
@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 8 hours 8 minutes 18 seconds in the queue, including 1 hour 55 minutes 29 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection] (documentation)
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

@mergify
mergify Bot merged commit e7966bf into haskell:master Jul 26, 2026
89 of 91 checks passed
@mergify mergify Bot removed the queued label Jul 26, 2026
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 merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants