The hackage-whatsnew package

[Tags:bsd3, program]

This tool checks to see if the package in a local working directory has changes which are not yet on hackage. This is useful to check if you have forgetton to upload your changes to hackage.

[Skip to Readme]


Dependencies base (>=4.6 && <5.0), Cabal (>=1.16 && <1.25), containers (==0.5.*), directory (==1.2.*), filepath (==1.4.*), hackage-db (==1.22.*), process (>=1.2 && <1.5), temporary (==1.2.*) [details]
License BSD3
Author Jeremy Shaw
Category Distribution
Home page
Source repository head: git clone
Uploaded Sat Jun 11 19:55:32 UTC 2016 by JeremyShaw
Distributions NixOS:
Downloads 171 total (16 in the last 30 days)
0 []
Status Docs not available [build log]
Last success reported on 2016-11-23 [all 2 reports]
Hackage Matrix CI


Maintainer's Corner

For package maintainers and hackage trustees

Readme for hackage-whatsnew

Readme for hackage-whatsnew-

hackage-whatsnew Hackage Build Status

Do you often modify a package, check that it builds in travis, and then FORGET TO UPLOAD IT!

Then this tool is for you! Its raison d'etre is to see if you have changes in your local directory which are not on hackage.


hackage-whatsnew depends on the following executables:

  1. cabal

  2. tar

  3. GNU diff (or any diff which supports the -r, -u, and -N options)

These binaries need to be in the current search path. Assuming everything is installed, to use hackage-whatsnew you simply need to:

  1. run cabal update

  2. cd into the same directory as the .cabal file

  3. run hackage-whatsnew

If no changes are detected, then nothing is printed and the exit code is 0.

If changes are detected a recursive diff is displayed and the exit code is 1.

How It Works

This tool works as follows:

  1. read the local .cabal file and figure out the package name

  2. use cabal fetch to get the latest version of the package from hackage

  3. use cabal sdist to generate the .tar.gz for the local working directory

  4. untar both .tar.gz bundles into temporary directories

  5. use diff -ruN to check for differences

  6. exit with 0 if no differences found

  7. exit with 1 if differences with found

  8. exit with 2 if other errors encountered


Q: Why is it called hackage-whatsnew instead of hackage-diff?

A: Because hackage-diff was already taken. The whatsnew term is inspired by darcs whatsnew.

Q: Would it by great if the tool did XYZ?

A: Yes! Please submit a pull request.