Ticket #501 (closed enhancement: fixed)
clean up UI for build logging / reporting
|Reported by:||duncan||Owned by:|
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-22.214.171.124 containers-0.1.0.1 directory-126.96.36.199 mtl-188.8.131.52 process-184.108.40.206 unix-220.127.116.11 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.