@@ -117,6 +117,7 @@ import Distribution.Compat.Directory (listDirectory)
117117
118118import Distribution.Client.ProjectBuilding.PackageFileMonitor
119119import Distribution.System (Platform (.. ))
120+ import qualified Distribution.Compat.Graph as Graph
120121
121122-- | Each unpacked package is processed in the following phases:
122123--
@@ -184,33 +185,39 @@ buildAndRegisterUnpackedPackage
184185 builddir
185186 mlogFile
186187 delegate = do
188+ info verbosity $ " \n\n buildAndRegisterUnpackedPackage: " ++ prettyShow (Graph. nodeKey pkg)
187189 -- Configure phase
188190 delegate $
189191 PBConfigurePhase $
190- annotateFailure mlogFile ConfigureFailed $
192+ annotateFailure mlogFile ConfigureFailed $ do
193+ info verbosity $ " --- Configure phase " ++ prettyShow (Graph. nodeKey pkg)
191194 setup configureCommand Cabal. configCommonFlags configureFlags configureArgs
192195
193196 -- Build phase
194197 delegate $
195198 PBBuildPhase $
196199 annotateFailure mlogFile BuildFailed $ do
200+ info verbosity $ " --- Build phase " ++ prettyShow (Graph. nodeKey pkg)
197201 setup buildCommand Cabal. buildCommonFlags (return . buildFlags) buildArgs
198202
199203 -- Haddock phase
200204 whenHaddock $
201205 delegate $
202206 PBHaddockPhase $
203207 annotateFailure mlogFile HaddocksFailed $ do
208+ info verbosity $ " --- Haddock phase " ++ prettyShow (Graph. nodeKey pkg)
204209 setup haddockCommand Cabal. haddockCommonFlags (return . haddockFlags) haddockArgs
205210
206211 -- Install phase
207212 delegate $
208213 PBInstallPhase
209214 { runCopy = \ destdir ->
210- annotateFailure mlogFile InstallFailed $
215+ annotateFailure mlogFile InstallFailed $ do
216+ info verbosity $ " --- Install phase, copy " ++ prettyShow (Graph. nodeKey pkg)
211217 setup Cabal. copyCommand Cabal. copyCommonFlags (return . copyFlags destdir) copyArgs
212218 , runRegister = \ pkgDBStack registerOpts ->
213219 annotateFailure mlogFile InstallFailed $ do
220+ info verbosity $ " --- Install phase, register " ++ prettyShow (Graph. nodeKey pkg)
214221 -- We register ourselves rather than via Setup.hs. We need to
215222 -- grab and modify the InstalledPackageInfo. We decide what
216223 -- the installed package id is, not the build system.
@@ -232,21 +239,24 @@ buildAndRegisterUnpackedPackage
232239 whenTest $
233240 delegate $
234241 PBTestPhase $
235- annotateFailure mlogFile TestsFailed $
242+ annotateFailure mlogFile TestsFailed $ do
243+ info verbosity $ " --- Test phase " ++ prettyShow (Graph. nodeKey pkg)
236244 setup testCommand Cabal. testCommonFlags (return . testFlags) testArgs
237245
238246 -- Bench phase
239247 whenBench $
240248 delegate $
241249 PBBenchPhase $
242- annotateFailure mlogFile BenchFailed $
250+ annotateFailure mlogFile BenchFailed $ do
251+ info verbosity $ " --- Benchmark phase " ++ prettyShow (Graph. nodeKey pkg)
243252 setup benchCommand Cabal. benchmarkCommonFlags (return . benchFlags) benchArgs
244253
245254 -- Repl phase
246255 whenRepl $
247256 delegate $
248257 PBReplPhase $
249- annotateFailure mlogFile ReplFailed $
258+ annotateFailure mlogFile ReplFailed $ do
259+ info verbosity $ " --- Repl phase " ++ prettyShow (Graph. nodeKey pkg)
250260 setupInteractive replCommand Cabal. replCommonFlags replFlags replArgs
251261
252262 return ()
0 commit comments