MyNixOS website logo
Description

Check for differences between working directory and hackage.

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.

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.

Usage

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

FAQ

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.

Metadata

Version

0.1.3

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows