hackage-whatsnew: Check for differences between working directory and hackage

[ bsd3, distribution, program ] [ Propose Tags ]

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]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,, 0.1.1, 0.1.2, 0.1.3
Dependencies base (>=4.6 && <5.0), Cabal (>=1.16 && <2.5), containers (>=0.5 && <0.7), directory (>=1.2 && <1.4), filepath (>=1.3 && <1.5), hackage-db (>=1.22 && <2.1), process (>=1.1 && <1.7), temporary (>=1.2 && <1.4) [details]
License BSD-3-Clause
Author Jeremy Shaw
Maintainer jeremy@n-heptane.com
Category Distribution
Home page https://github.com/stepcut/hackage-whatsnew
Source repo head: git clone https://github.com/stepcut/hackage-whatsnew.git
Uploaded by JeremyShaw at 2018-10-30T20:36:36Z
Reverse Dependencies 1 direct, 0 indirect [details]
Executables hackage-whatsnew
Downloads 3624 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2018-11-02 [all 3 reports]

Readme for hackage-whatsnew-0.1.2

[back to package description]

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.