[Haskell-cafe] Edit Hackage

John Millikin jmillikin at gmail.com
Thu Oct 28 17:21:49 EDT 2010


On Thu, Oct 28, 2010 at 12:34, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> Today I uploaded a package to Hackage, and rediscovered something that you
> already know: I'm an idiot.
>
> More specifically, I copied the Cabal description from another package and
> then updated all the fields. Except that I forgot to update one. And now I
> have a package which I've erroneously placed in completely the wrong
> category.

Don't worry; of all the various ways to screw up a Hackage upload,
setting the wrong category is just about the least important. Wait
until you've got a few dozen packages in the air, and your hair will
turn grey ;)

> Is there any danger that at some point in the future, it might be possible
> to edit a package /after/ it has been released on Hackage? There are several
> reasons why you might wish to do this (beyond realising you did something
> wrong five minutes after hitting the upload button):

Sadly, the current Hackage maintainers follow the "immutability is
good" school of design. A few aspects of packages can be modified, but
most (those contained in the .cabal file) cannot.

> The maintainer might change. The homepage might move.

Both of these are handled by uploading a package with a _._._.Z
version number; in general, package version numbers are:

X.X.Y.Z

X.X - the package's major version. Bump this when there's a
backwards-incompatible change (eg, dependent packages might break)

Y - minor version. Bump this when the package changes, but in a
backwards-compatible way.

Z - patch version. Bump this when you just change something that
doesn't affect the code itself (comments, documentation, cabal
properties)

> A better package might come along, making the existing one obsolete.

The only way to mark packages as obsolete, as far as I know, is to
email a Hackage administrator.

> Or you might want to stick a message on the package saying "hey, this version has a serious
> bug, please use the next version up instead!"

This would be useful; maybe a feature for Hackage 2?


More information about the Haskell-Cafe mailing list