Watch out hackage revisions

Hi,

Package version on Hackage can be overloaded with multiple revisions, nonetheless Hacakge web ui doesn’t have any sign how many revisions a package version has.

I discovered the issue after trying to understand why hslogger is not working for me on ghc901, mean while issues is closed and there is no any commit or release!

1 Like

The Hackage web UI does show the revisions for a package. For instance, lens-5.0.1 currently has 1 revision. From https://hackage.haskell.org/package/lens-5.0.1:

image

If you click on Revision 1 here, you’re taken to Metadata revisions for lens-5.0.1 | Hackage, which is a list of all revisions.


There are some nice things about revisions, although I agree they are quite unintuitive and surprising. I sometimes wonder if the Haskell ecosystem would be better without them.

I bumped into this today and really needed to find a way to get a more recent revision than what one gets by default. After finding a solution I wrote it up: Hackage revisions in Nix

The gist of it is

hl = nixpkgs.haskell.lib.compose;

hsPkgs = nixpkgs.haskell.packages.ghc963.override {
  overrides = newpkgs: oldpkgs: {
    openapi3 = hl.overrideCabal (drv: {
      revision = "4";
      editedCabalFile =
        "sha256-a5C58iYrL7eAEHCzinICiJpbNTGwiOFFAYik28et7fI=";
    }) (oldpkgs.callHackageDirect {
      pkg = "openapi3";
      ver = "3.2.3";
      sha256 = "sha256-0F16o3oqOB5ri6KBdPFEFHB4dv1z+Pw6E5f1rwkqwi8=";
    } { });
1 Like