Skip to content
This repository

print less useless info during builds #480

Open
bos opened this Issue May 23, 2012 · 1 comment

1 participant

Bryan O'Sullivan
Bryan O'Sullivan
Owner
bos commented May 23, 2012

(Imported from Trac #487, reported by @dcoutts on 2009-02-02)

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.

Bryan O'Sullivan
Owner
bos commented May 23, 2012

(Imported comment by gtirloni on 2009-02-02)

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.