-
Notifications
You must be signed in to change notification settings - Fork 710
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
base: master
Are you sure you want to change the base?
Add cfgVerbosity #10688
Conversation
d33d578
to
a0bfc7d
Compare
6d41621
to
5a0e55b
Compare
9241039
to
a4848dc
Compare
Configuration is affected by the following files: | ||
- cabal.project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this appearing twice in the output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philderbeast: any comment?
d70b9d8
to
d58c3c0
Compare
d58c3c0
to
ec02235
Compare
ec02235
to
b2f50b6
Compare
b2f50b6
to
085e216
Compare
085e216
to
bbe2cd6
Compare
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. |
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 thatwithContextAndSelectors
does (Cmd*.hs
modules do this):cabal/cabal-install/src/Distribution/Client/CmdRepl.hs
Line 509 in 62073c9
cabal/cabal-install/src/Distribution/Client/ScriptUtils.hs
Line 340 in 62073c9
This is a refactor that adds a verbosity argument to
withContextAndSelectors
and a functioncfgVerbosity
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 fromDistribution.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.Footnotes
Depending on whether
cabal repl
should pick the one target, Shouldcabal repl
pick the one package library as TARGET? #10689. ↩