[Haskell-cafe] Tools to assist with development cycle of hackage packages

Clinton Mead clintonmead at gmail.com
Fri Mar 17 10:14:08 UTC 2017


I've only just started uploading packages to hackage (my package listing is
here <https://hackage.haskell.org/user/clinton>) but currently there's a
lot of repetitive activities for creating and updating packages.

For example, here's the steps in creating a package:


   1. Initialise a repository on github
   2. Initialise git repository locally
   3. Set github repository as remote
   4. Add a LICENSE file
   5. Add a standard ".gitignore file"
   6. Create a cabal file with the appropriate files that hackage requires
   including:
      1. Git repository source
      2. Issues page
      3. Licence
      4. Licence file
   7. Run multi-ghc-travis <https://github.com/hvr/multi-ghc-travis> to
   create a ".travis.yml" file
   8. Make an initial commit and push
   9. Refresh travis-ci.org's repository list so it detects the new
   repository

There's also the stack stuff, but the GUI I'm using, IntelliJ with a
Haskell plugin, handles most of that. It also creates a cabal file, but
it's missing a number of key fields as mentioned above.

When I actually want to upload the package I go though these steps:


   1. Push to github
   2. Wait for Travis-CI to compile the package (this is a test to ensure
   it builds in a clean remote environment).
   3. Run "cabal sdist 2>&1"
   4. Parse the output of sdist to see where the dist file is.
   5. Run "hup <https://hackage.haskell.org/package/hup> packup
   fileFromSDist" to upload the package, putting in my hackage user/pass
   6. Run "hup docboth", to both build and upload the documentation.
   7. Tag the commit as a release

Currently, I've got two scripts with help with a lot of this, but it's a
bit adhoc, and it's not fully automated (for example, I still have to
manually ensure all the correct fields are in the cabal file, usually by
copy/pasting from another package and modifying).

Are there any tools that I haven't found that make this process a bit more
painless? I'm a bit new to this area, and I've only started using git
recently as a prelude to uploading my Haskell packages, so admittedly I may
have missed something obvious or perhaps I'm just doing it all wrong.

But if other people do find it painful like me, perhaps I'll put some
effort into rewriting my perl scripts into nice haskell packages and
executables for others to use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170317/83bebed4/attachment.html>


More information about the Haskell-Cafe mailing list