Ticket #487 (new enhancement)

Opened 4 years ago

Last modified 17 months ago

print less useless info during builds

Reported by: duncan Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.6.0.1
Severity: minor Keywords:
Cc: gtirloni@… Difficulty: easy (<4 hours)
GHC Version: Platform:

Description

Here's an example from a blog post:

$ cabal update
$ cabal install gofer-prelude 
Resolving dependencies...
Downloading gofer-prelude-2.30...
Configuring gofer-prelude-2.30...
Preprocessing library gofer-prelude-2.30...
Building gofer-prelude-2.30...
[1 of 1] Compiling Prelude.Gofer    ( Prelude/Gofer.hs, dist/build/Prelude/Gofer.o )
/usr/bin/ar: creating dist/build/libHSgofer-prelude-2.30.a
Installing library in /home/dons/.cabal/lib/gofer-prelude-2.30/ghc-6.10.1
Registering gofer-prelude-2.30...
Reading package info from "dist/installed-pkg-config" ... done.
Writing new package config file... done.

Which bits are useful and useless? I mean at the standard verbosity level.

I bet this is useless:

Preprocessing library gofer-prelude-2.30...

Does it actually do any pre-processing? See also #475.

Useless:

/usr/bin/ar: creating dist/build/libHSgofer-prelude-2.30.a

This is produced by the ar program. We can however pass it a flag to tell it to be quiet.

Not especially useful:

Installing library in /home/dons/.cabal/lib/gofer-prelude-2.30/ghc-6.10.1

This message is generated by Cabal. At the default verbosity level we probably only need something like "Installing gofer-prelude-2.30..."

Useless:

Reading package info from "dist/installed-pkg-config" ... done.
Writing new package config file... done.

This message is generated by ghc-pkg. We should patch ghc-pkg to not be so verbose by default. That message is only needed at a higher verbosity level.

So if we get all these things fixed it'd look like:

$ cabal update
Downloading package list from hackage.haskell.org
$ cabal install gofer-prelude
Resolving dependencies...
Downloading gofer-prelude-2.30...
Configuring gofer-prelude-2.30...
Building gofer-prelude-2.30...
[1 of 1] Compiling Prelude.Gofer    ( Prelude/Gofer.hs, dist/build/Prelude/Gofer.o )
Installing gofer-prelude-2.30...
Registering gofer-prelude-2.30...

This is assuming the package in question doesn't actually need any pre-processing. Even the pre-processing message could be elided if we don't think it'll take that long.

I wonder if we can get ghc to not tell us the source and object file locations. While it is sometimes useful while hacking, for batch builds we do not need it.

Change History

Changed 19 months ago by gtirloni

  • cc gtirloni@… added

It looks like verbosity has improved in cabal-install 0.10.2 and cabal 1.10.2.0 (see below):

$ cabal install gofer-prelude
Resolving dependencies...
Downloading gofer-prelude-2.30.3...
Configuring gofer-prelude-2.30.3...
Preprocessing library gofer-prelude-2.30.3...
Building gofer-prelude-2.30.3...
[1 of 1] Compiling Prelude.Gofer    ( Prelude/Gofer.hs, dist/build/Prelude/Gofer.o )
Registering gofer-prelude-2.30.3...
Installing library in /home/gtirloni/.cabal/lib/gofer-prelude-2.30.3/ghc-7.0.4
Registering gofer-prelude-2.30.3...

Is it OK to close this ticket?

Changed 17 months ago by elga

Changed 17 months ago by edouard

Simplifiez-vous la tache des aujourd'hui: obtenez vos codes Orange rio, SFR rio, Bouygues rio, Virgin Mobile rio ou Simyo rio et effectuez la portabilite de son numero de telephone sans tracas...en douceur !  virgin mobile

Note: See TracTickets for help on using tickets.