[Haskell-cafe] Checking packages before upload to Hackage

Gwern Branwen gwern0 at gmail.com
Fri Jun 20 12:12:05 EDT 2008


On Fri, Jun 20, 2008 at 11:43 AM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> Is there some command which tests a tar.gz created by 'Setup.lhs sdist' by
> unpacking the archive to say /tmp and compiling and documenting the sources?
> Hackage should recommend this tool before package upload.

There isn't. However, I do have some shell scripts which I use to the
same effect. They go like this:

function rh { nice runhaskell Setup "$@" --verbose; }
function build { rh build "$@"; }
function build_clean { rh clean && rh build "$@"; }
function build_sdist { clean_configure && sdist &&
    cd dist/ && untar *.tar.gz && cd `ls -t ./ | grep "/" | head -n 1` &&
    clean_configure && build && hinstall; haddock && hinstall; }
function clean { rh clean "$@"; }
function clean_configure { clean && configure; }
function configurenop { rh configure --enable-split-objs --user
--prefix=$HOME/bin "$@"; }
function configure { configurenop --enable-executable-profiling -p  "$@"; }
function haddock { rh haddock --executables "$@"; }
function hinstall { rh install --user "$@"; }
function sdist { rh sdist "$@"; }
function haskell { ( http_proxy="" pull ) & clean_configure && (build_sdist) & }

(Obviously you would either run 'haskell' or 'build_sdist' to test things out.)

If you're interested in a Haskell solution, there is an open Cabal bug
for this: <http://hackage.haskell.org/trac/hackage/ticket/274>.

--
gwern


More information about the Haskell-Cafe mailing list