Ticket #501 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

clean up UI for build logging / reporting

Reported by: duncan Owned by:
Priority: normal Milestone:
Component: cabal-install tool Version:
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: Platform:

Description

The current cabal install command line interface to specify build logs files is incomplete and a bit confusing.

The current interface is:

--log-builds=FILE   Log all builds to file (name template
                    can use $pkgid, $compiler, $os, $arch)
--build-reports     Generate detailed build reports.
                    (overrides --log-builds)

However we also always generate a local build summary to ~/.cabal/logs/build.log and a anonymous remote one in ~/.cabal/packages/$server/build-reports.log. The generation of these is not controllable at the moment.

While the underlying mechanisms are similar, we think it is useful in the user interface to separate the local logging from the generation of build reports to send to remote hackage servers.

There are two aspects to local logging. We can generate machine readable summary information like:

package: xmonad-0.7
os: linux
arch: x86_64
compiler: ghc-6.8.2
client: cabal-install-0.5.2
flags: -testing small_base
dependencies: X11-1.4.2 base-3.0.1.0 containers-0.1.0.1
              directory-1.0.0.0 mtl-1.1.0.0 process-1.0.0.0 unix-2.3.0.0
install-outcome: InstallOk
docs-outcome: NotTried
tests-outcome: NotTried

and we can generate the actual build log.

So we propose controlling each separately with the flags:

--local-build-summary=FILE
--local-build-log=FILE

The FILE parameter can contain instances of variables like '$pkgid' etc to allow for splitting the summaries or logs into different files. Each log/summary file is written using file append so it should be possible to have both go into one file (interleaved).

For the remote case the layout of the files is prescribed. The user has no control over that. They should just be able to specify the level of logging. We suggest:

--remote-build-reporting=[none,anonymous,detailed]

A couple remaining questions:

  • how to specify that we do not want any local summary, not even the default one
  • does --local-build-summary= specify a single valued configuration setting or a list? If I specify it multiple times, does it write into all files or only the last?

One possible answer to the above is to say that it's a list of files and the default is given in the ~/.cabal/config file. So adding --local-build-summary= would write into both the default and the extra file. That way if someone really wants to they can turn off the default log.

Change History

Changed 4 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Done

Sun Feb 15 18:58:00 GMT 2009  Duncan Coutts <duncan@haskell.org>         
  * Rearrange user interface for build logging
  The new options (as described in ticket #501) are:
    --build-summary=TEMPLATE
    --build-log=TEMPLATE
    --remote-build-reporting=LEVEL
    where LELVEL `elem` [none,anonymous,detailed]

Sun Feb 15 19:02:54 GMT 2009  Duncan Coutts <duncan@haskell.org>
  * Complete the implementation of --build-summary=TEMPLATE
  Actually respect the new flag. It's actually a list of template files
  and all specified files get written to. This allows us to specify
  a default build log file and also have the user write to extra ones.
  The summary file template can contain $pkgid $compiler etc.

Sun Feb 15 19:05:24 GMT 2009  Duncan Coutts <duncan@haskell.org>
  * Put the default logging and reporting setting in the initial config file.
Note: See TracTickets for help on using tickets.