Ticket #244 (new enhancement)

Opened 10 months ago

Last modified 1 month ago

Add Changelog summary feature to sdist

Reported by: guest Assigned to:
Priority: low Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: gwern0@gmail.com Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

In a discussion with Audrey Tang, she mentioned that a very nice feature of CPAN which she missed in Hackage was standardized changes files.

It seems to me that one way to acheive this would be to add a --changelog flag to sdist (or maybe make default). This call 'darcs changes' and copy into the ChangeLog? everything up to 2 tags ago. (2 tags because the first tag might be you preparing for a release). I'd imagine parsing would be dead easy: 'lines' to split it up into individual entries, and then take until you hit a 'tagged' entry. If the resulting list is length of 1, then take again.

So you'd go 'runhaskell Setup sdist --changelog', and ChangeLog? in the tarball would have, say, for Monadius:


Wed Feb 20 18:37:42 EST 2008 gwern0@gmail.com

tagged 0.91

Wed Feb 20 18:37:29 EST 2008 gwern0@gmail.com

  • misc improvements: newtype, cabal, fmt

Fri Dec 7 16:23:53 EST 2007 gwern0@gmail.com

  • rm extra source-files The line was originally there because there is an icon for Monadius in the source-files and some sort of Windows resource text file telling Windows to use it; I'm removing the mention of them in the .cabal because I don't think Cabal handles that right now.

Thu Dec 6 16:30:31 EST 2007 gwern0@gmail.com

  • whitespace changes, add haskell98 to dependencies

Tue Dec 4 13:46:38 EST 2007 gwern0@gmail.com

  • mv cabal field so hackage doesn't complain

Tue Dec 4 13:10:47 EST 2007 gwern0@gmail.com

  • cabal fixes

Tue Dec 4 08:32:25 EST 2007 gwern0@gmail.com

tagged 0.91


At this point, Hackage could be updated to link to it in the same way as it does for the .cabal file. That way, people could then easily take a look and see what's new since the last version. (Said facility is currently a little difficult unless the package authors manually maintain a ChangeLog? and specifically include it into the tarball; you'd still have to either go to the repo or download the tarball simply to find out what's different from the older packages.)

--gwern

Change History

02/21/08 00:51:47 changed by tibbe

We should also take other version control systems into account.

04/08/08 19:31:27 changed by guest

It's worth noting that Darcs actually already has a little utility program which parses 'darcs changes'; it's probably a useful place to start.

05/14/08 12:16:42 changed by guest

It's worth noting that I learned today there's an even better way: 'darcs changes --from-tag=.'.

-- gwern

(follow-up: ↓ 5 ) 05/14/08 19:02:45 changed by guest

Anyway, to move things forward:

It isn't all that hard for most VCSes to extract 'everything since the last tag'.

As a matter of fact, I found it relatively easy to write a library/executable to do this for Darcs, Gits, and Mercurial. (Subversion and CVS are both much more difficult, and I just couldn't be bothered for Monotone, Codeville, or Bazaar.)

You can find it here:

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/change-monger-0.0

I hope y'all will consider incorporating the code into Cabal, or at least maybe adding some sort of option.

-- gwern

(in reply to: ↑ 4 ) 05/14/08 19:09:02 changed by guest

Replying to guest:

I hope y'all will consider incorporating the code into Cabal, or at least maybe adding some sort of option. -- gwern

'Some sort of option' here being, I dunno, maybe an '--include=' option where you list a file to include in the sdist tarball regardless of whether it's mentioned in the cabal file or anything.

So you could at least do something like:

function sdist () { change-monger; cabal sdist --include=ChangeLog?; }

-- gwern

06/21/08 23:00:32 changed by guest

  • cc set to gwern0@gmail.com.

10/29/08 12:31:44 changed by duncan

See also #299