Skip to content

Commit 3e89d2d

Browse files
committed
Re #8392: fix golden test by using notice verbosity in GenBounds
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
1 parent 0e2a506 commit 3e89d2d

File tree

2 files changed

+5
-4
lines changed
  • cabal-install/src/Distribution/Client
  • cabal-testsuite/PackageTests/GenBounds/Issue6290

2 files changed

+5
-4
lines changed

cabal-install/src/Distribution/Client/GenBounds.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Distribution.Simple.PackageDescription
4040
import Distribution.Simple.Program
4141
( ProgramDb )
4242
import Distribution.Simple.Utils
43-
( tryFindPackageDesc )
43+
( notice, tryFindPackageDesc )
4444
import Distribution.System
4545
( Platform )
4646
import Distribution.Version
@@ -118,11 +118,11 @@ genBounds verbosity packageDBs repoCtxt comp platform progdb globalFlags freezeF
118118

119119
let padTo = maximum $ map (length . unPackageName . packageName) pkgs
120120

121-
if null thePkgs then putStrLn
121+
if null thePkgs then notice verbosity
122122
"Congratulations, all your dependencies have upper bounds!"
123123
else do
124-
putStrLn boundsNeededMsg
125-
traverse_ (putStrLn . (++",") . showBounds padTo) thePkgs
124+
notice verbosity boundsNeededMsg
125+
traverse_ (notice verbosity . (++",") . showBounds padTo) thePkgs
126126

127127
depName :: Dependency -> String
128128
depName (Dependency pn _ _) = unPackageName pn
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# cabal gen-bounds
22
Resolving dependencies...
3+
Congratulations, all your dependencies have upper bounds!

0 commit comments

Comments
 (0)