haskell / hackage-server

Hackage-Server: A Haskell Package Repository
http://hackage.haskell.org
Other
414 stars 198 forks source link

Feature: Download link for revised packages #1291

Open andreasabel opened 9 months ago

andreasabel commented 9 months ago

Hackage provides download URLs for uploaded packages, but these do not include the revisions. It would be good to also have download URLs for specific revisions of a package, which would deliver the patched package tarball.

There seems to be interest from the Arch community in such a feature see a discussion with @Vekhir at this PR:

geekosaur commented 1 week ago

This would have to be generated on the fly, because hackage-server doesn't store updated package tarballs; rather, it appends the updated revision to the index, and cabal get overwrites the original tarball's cabal file with the revised one. This is done to preserve immutability of the Hackage store. (@hasufell complains about this somewhat regularly.)

hasufell commented 1 week ago

There seems to be interest from the Arch community in such a feature see a discussion with @Vekhir at this PR

Hackage does provide API though to get the latest (or any) cabal file revision for a package.

Using that you can easily circumvent this restriction. But it does make it more annoying for distributors, mirrors, etc.

@hasufell complains about this somewhat regularly.

It is indeed a mis-feature, for many reasons.

The strongest argument is that a tarball should be a self-contained entity.