Skip to content

Add cfgVerbosity #10688

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

Merged
merged 5 commits into from
Jun 17, 2025
Merged

Add cfgVerbosity #10688

merged 5 commits into from
Jun 17, 2025

Conversation

philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Dec 29, 2024

I was working on a fix for #10527 and noticed that all but one of the callers of withContextAndSelectors had already accessed verbosity in the same way that withContextAndSelectors does (Cmd*.hs modules do this):

verbosity = fromFlagOrDefault normal (setupVerbosity $ configCommonFlags configFlags)

verbosity = fromFlagOrDefault normal (setupVerbosity $ configCommonFlags configFlags)

This is a refactor that adds a verbosity argument to withContextAndSelectors and a function cfgVerbosity that simplifies grabbing the verbosity from the configuration or using a default value.

With this a lot of -XRecordWildCards can be removed as can a lot of imports from Distribution.Client.Setup.

This will help with my fix for #10527 too as I may have to call withContextAndSelectors twice1 and don't want repeated messaging so would silence the verbosity of the first call.

Configuration is affected by the following files:
- cabal.project
Configuration is affected by the following files:
- cabal.project

  • 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).

Footnotes

  1. Depending on whether cabal repl should pick the one target, Should cabal repl pick the one package library as TARGET? #10689.

@philderbeast philderbeast force-pushed the add/cfg-verbosity branch 2 times, most recently from d70b9d8 to d58c3c0 Compare January 20, 2025 11:46
@philderbeast
Copy link
Collaborator Author

I've marked this as blocked until I can answer the question from @ffaf1, #10688 (comment). I want to check some other branches of mine to find the code snippet that will help with an explanation.

@philderbeast
Copy link
Collaborator Author

@mergify refresh

Copy link
Contributor

mergify bot commented Jun 16, 2025

refresh

✅ Pull request refreshed

@philderbeast
Copy link
Collaborator Author

@Kleidukos and @geekosaur thanks for the approvals. I've answered @ffaf1 's question about the duplicate messages. The fix for those duplicates is in #10684 that depends on this pull request. Following @geekosaur 's suggestion, I've marked #10940 as dependent on #10684.

Is there anything more I need to do to hurry up mergify?

@geekosaur
Copy link
Collaborator

Just set the label.

@philderbeast
Copy link
Collaborator Author

Just set the label.

Oops. Been a while. I'm out of practice.

@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Jun 16, 2025
@Mikolaj Mikolaj added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jun 17, 2025
@mergify mergify bot merged commit e6a70eb into haskell:master Jun 17, 2025
52 checks passed
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+no rebase ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants