[Hackage] #501: clean up UI for build logging / reporting

Hackage trac at galois.com
Sun Feb 15 08:21:23 EST 2009

#501: clean up UI for build logging / reporting
  Reporter:  duncan              |        Owner:     
      Type:  enhancement         |       Status:  new
  Priority:  normal              |    Milestone:     
 Component:  cabal-install tool  |      Version:     
  Severity:  normal              |     Keywords:     
Difficulty:  normal              |   Ghcversion:     
  Platform:                      |  
 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- containers-
               directory- mtl- process- unix-
 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:
 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:

 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.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/501>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list