Hackage 'changelog' display (was: Fwd: [commit: packages/stm] master: Refactor & update `stm.cabal` to `cabal-version>=1.10` (aa4774b))
David Fox
dsf at seereason.com
Fri Oct 25 13:14:55 UTC 2013
I'd like to put in a plug for allowing the format used in debian/changelog,
and for allowing a changelog-file field in the cabal file. We have lots of
packages with debian/changelog files that go back years, and you can't
build a deb without a debian/changelog file. There is a parser for the
format in the debian package.
On Fri, Oct 18, 2013 at 10:29 AM, Duncan Coutts <
duncan.coutts at googlemail.com> wrote:
> On Fri, 2013-10-18 at 16:05 +0200, Herbert Valerio Riedel wrote:
> > Hello Duncan,
> >
> > ...any recommendation on this one? For isntance, how do I best add a
> link from the
> > description-field pointing to the changelog file?
>
> No I think the longer term solution is to treat the changelog properly
> in some machine-readable form so that hackage can show the changes in a
> reasonable way, e.g. most recent changes, expand to more detail.
>
> I don't think we really want to have the current situation where some
> packages have these huge descriptions including long changelogs and
> others have nothing. It's all rather inconsistent.
>
> We should probably have hackage show only the first ~20-30 lines of the
> description and let the user expand that if they want to see more, and
> do a similar thing for the changelog.
>
> Simon makes the point that he likes having the changelog in the .cabal
> file rather than a separate file because it's less mental effort to
> update, as you can see it at the same time as the version. So perhaps
> what we should do is add a changelog field to the .cabal file an allow
> that to be inline, or to refer to a file, e.g. "changelog:" or
> "changlog-file:". Either way we can then do a bit of simple syntax
> checking so we know we can format it ok on hackage and in other tools.
>
> Duncan
>
>
> ---------- Forwarded message ----------
> From: Simon Marlow <marlowsd-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
> To: ghc-devs-HC+Z4NTRIlBAfugRpC6u6w at public.gmane.org
> Cc:
> Date: Fri, 18 Oct 2013 13:06:13 +0200
> Subject: Re: [commit: packages/stm] master: Refactor & update `stm.cabal`
> to `cabal-version>=1.10` (aa4774b)
> I'm not keen on losing the changelog from the description. The idea of
> having the changelog in the description is:
>
> - it is prominent on the Hackage page for the package
>
> - it's next to the version in the .cabal file, so you're more likely
> to update it when updating the version.
>
> I don't mind splitting it into two - maybe the first few entries in the
> description and the rest in a separate file, with a link from the
> description.
>
> Cheers,
> Simon
>
> On 14/10/2013 22:38, git-4Dsf34iY/NkouOHNgZ69ag at public.gmane.org wrote:
> > Repository : ssh://git-4Dsf34iY/NkouOHNgZ69ag@public.gmane.org/stm
> >
> > On branch : master
> > Link :
> http://git.haskell.org/packages/stm.git/commitdiff/aa4774b7d5f65cbf007803ff54995921a36fbaeb
> >
> >> ---------------------------------------------------------------
> >
> > commit aa4774b7d5f65cbf007803ff54995921a36fbaeb
> > Author: Herbert Valerio Riedel <hvr-mXXj517/zsQ at public.gmane.org>
> > Date: Mon Oct 14 22:02:35 2013 +0200
> >
> > Refactor & update `stm.cabal` to `cabal-version>=1.10`
> >
> > As the current code fails to build with GHC 6.10, I've updated the
> Cabal
> > meta-data to declare support for GHC>=6.12 and dropped support for
> > base3. This also moves the changelog from the Cabal description
> field
> > into a separate `changelog` file and adds a few entries.
> >
> > The code compiles warning-free for all tested GHC versions.
> >
> > Signed-off-by: Herbert Valerio Riedel <hvr-mXXj517/
> zsQ at public.gmane.org>
> >
> >
> >> ---------------------------------------------------------------
> >
> > aa4774b7d5f65cbf007803ff54995921a36fbaeb
> > Control/Concurrent/STM/TVar.hs | 5 --
> > Control/Sequential/STM.hs | 18 -------
> > changelog | 38 +++++++++++++++
> > stm.cabal | 103
> ++++++++++++++++++----------------------
> > 4 files changed, 83 insertions(+), 81 deletions(-)
> >
> > diff --git a/Control/Concurrent/STM/TVar.hs
> b/Control/Concurrent/STM/TVar.hs
> > index d15896b..6435e17 100644
> > --- a/Control/Concurrent/STM/TVar.hs
> > +++ b/Control/Concurrent/STM/TVar.hs
> > @@ -43,11 +43,6 @@ import GHC.Weak
> > import Control.Sequential.STM
> > #endif
> >
> > -#if ! (MIN_VERSION_base(4,2,0))
> > -readTVarIO = atomically . readTVar
> > -#endif
> > -
> > -
> > -- Like 'modifyIORef' but for 'TVar'.
> > -- | Mutate the contents of a 'TVar'. /N.B./, this version is
> > -- non-strict.
> > diff --git a/Control/Sequential/STM.hs b/Control/Sequential/STM.hs
> > index 468e7bd..a644e67 100644
> > --- a/Control/Sequential/STM.hs
> > +++ b/Control/Sequential/STM.hs
> > @@ -40,35 +40,17 @@ instance Monad STM where
> > x <- m r
> > unSTM (k x) r
> >
> > -#ifdef BASE4
> > atomically :: STM a -> IO a
> > atomically (STM m) = do
> > r <- newIORef (return ())
> > m r `onException` do
> > rollback <- readIORef r
> > rollback
> > -#else
> > -atomically :: STM a -> IO a
> > -atomically (STM m) = do
> > - r <- newIORef (return ())
> > - m r `catch` \ ex -> do
> > - rollback <- readIORef r
> > - rollback
> > - throw ex
> > -#endif
> >
> > -#ifdef BASE4
> > throwSTM :: Exception e => e -> STM a
> > -#else
> > -throwSTM :: Exception -> STM a
> > -#endif
> > throwSTM = STM . const . throwIO
> >
> > -#ifdef BASE4
> > catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
> > -#else
> > -catchSTM :: STM a -> (Exception -> STM a) -> STM a
> > -#endif
> > catchSTM (STM m) h = STM $ \ r -> do
> > old_rollback <- readIORef r
> > writeIORef r (return ())
> > diff --git a/changelog b/changelog
> > new file mode 100644
> > index 0000000..1296a41
> > --- /dev/null
> > +++ b/changelog
> > @@ -0,0 +1,38 @@
> > +-*-changelog-*-
> > +
> > +2.4.2.1 Oct 2013
> > +
> > + * Updated behaviour of `newBroadcastTChanIO` to match
> > + `newBroadcastTChan` in causing an error on a read from
> > + the broadcast channel
> > +
> > + * Add `mkWeakTVar`
> > +
> > + * Add `isFullTBQueue`
> > +
> > + * Fix `TChan` created via `newBroadcastTChanIO` to throw same
> > + exception on a `readTChan` as when created via `newBroadcastTChan`
> > +
> > +2.4.2 Nov 2012
> > +
> > + * Add "Control.Concurrent.STM.TSem" (transactional semaphore)
> > +
> > + * Add Applicative/Alternative instances of STM for GHC <7.0
> > +
> > + * Throw proper exception when `readTChan` called on a broadcast
> > + `TChan`
> > +
> > +2.4 Jul 2012
> > +
> > + * Add "Control.Concurrent.STM.TQueue" (a faster `TChan`)
> > +
> > + * Add "Control.Concurrent.STM.TBQueue" (a bounded channel based on
> > + `TQueue`)
> > +
> > + * Add `Eq` instance for `TChan`
> > +
> > + * Add `newBroadcastTChan` and `newBroadcastTChanIO`
> > +
> > + * Some performance improvements for `TChan`
> > +
> > + * Add `cloneTChan`
> > diff --git a/stm.cabal b/stm.cabal
> > index 568b8a3..998bb24 100644
> > --- a/stm.cabal
> > +++ b/stm.cabal
> > @@ -1,68 +1,55 @@
> > -name: stm
> > +name: stm
> > version: 2.4.2.1
> > -license: BSD3
> > -license-file: LICENSE
> > -maintainer: libraries-HC+Z4NTRIlBAfugRpC6u6w at public.gmane.org
> > -synopsis: Software Transactional Memory
> > +license: BSD3
> > +license-file: LICENSE
> > +maintainer: libraries-HC+Z4NTRIlBAfugRpC6u6w at public.gmane.org
> > +bug-reports:
> http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=stm
> > +synopsis: Software Transactional Memory
> > category: Concurrency
> > -description:
> > - A modular composable concurrency abstraction.
> > - .
> > - Changes in version 2.4.2.1
> > - .
> > - * Updated behaviour of @newBroadcastTChanIO@ to match
> > - @newBroadcastTChan@ in causing an error on a read from
> > - the broadcast channel.
> > - .
> > - Changes in version 2.4.2
> > - .
> > - * Added "Control.Concurrent.STM.TSem" (transactional semaphore)
> > - .
> > - Changes in version 2.4.1
> > - .
> > - * Added Applicative/Alternative instances of STM for GHC <7.0
> > - .
> > - Changes in version 2.4
> > - .
> > - * Added "Control.Concurrent.STM.TQueue" (a faster @TChan@)
> > - .
> > - * Added "Control.Concurrent.STM.TBQueue" (a bounded channel based on
> @TQueue@)
> > - .
> > - * @TChan@ has an @Eq@ instances
> > - .
> > - * Added @newBroadcastTChan@ and @newBroadcastTChanIO@
> > - .
> > - * Some performance improvements for @TChan@
> > - .
> > - * Added @cloneTChan@
> > -
> > +description: A modular composable concurrency abstraction.
> > build-type: Simple
> > -cabal-version: >=1.6
> > +cabal-version: >=1.10
> > +tested-with: GHC==7.6.3, GHC==7.6.2, GHC==7.6.1, GHC==7.4.2,
> GHC==7.4.1, GHC==7.2.2, GHC==7.2.1, GHC==7.0.4, GHC==7.0.3, GHC==7.0.2,
> GHC==7.0.1, GHC==6.12.3
> > +
> > +extra-source-files:
> > + changelog
> >
> > source-repository head
> > type: git
> > location: http://git.haskell.org/packages/stm.git
> >
> > -flag base4
> > +source-repository this
> > + type: git
> > + location: http://git.haskell.org/packages/stm.git
> > + tag: stm-2.4.2.1-release
> >
> > library
> > - exposed-modules:
> > - Control.Concurrent.STM
> > - Control.Concurrent.STM.TArray
> > - Control.Concurrent.STM.TVar
> > - Control.Concurrent.STM.TChan
> > - Control.Concurrent.STM.TMVar
> > - Control.Concurrent.STM.TQueue
> > - Control.Concurrent.STM.TBQueue
> > - Control.Concurrent.STM.TSem
> > - Control.Monad.STM
> > - other-modules:
> > - Control.Sequential.STM
> > - build-depends: base < 5, array
> > - if flag(base4)
> > - build-depends: base >=4
> > - cpp-options: -DBASE4
> > - else
> > - build-depends: base <4
> > - if impl(ghc >= 6.10)
> > - build-depends: base >=4
> > + default-language: Haskell98
> > + other-extensions:
> > + CPP
> > + DeriveDataTypeable
> > + FlexibleInstances
> > + MagicHash
> > + MultiParamTypeClasses
> > + UnboxedTuples
> > + if impl(ghc >= 7.2)
> > + other-extensions: Trustworthy
> > +
> > + build-depends:
> > + base >= 4.2 && < 4.8,
> > + array >= 0.3 && < 0.6
> > +
> > + exposed-modules:
> > + Control.Concurrent.STM
> > + Control.Concurrent.STM.TArray
> > + Control.Concurrent.STM.TVar
> > + Control.Concurrent.STM.TChan
> > + Control.Concurrent.STM.TMVar
> > + Control.Concurrent.STM.TQueue
> > + Control.Concurrent.STM.TBQueue
> > + Control.Concurrent.STM.TSem
> > + Control.Monad.STM
> > + other-modules:
> > + Control.Sequential.STM
> > +
> > + ghc-options: -Wall
> > \ No newline at end of file
> >
> > _______________________________________________
> > ghc-commits mailing list
> > ghc-commits-HC+Z4NTRIlBAfugRpC6u6w at public.gmane.org
> > http://www.haskell.org/mailman/listinfo/ghc-commits
> >
>
> _______________________________________________
> cabal-devel mailing list
> cabal-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/cabal-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cabal-devel/attachments/20131025/917dc761/attachment.html>
More information about the cabal-devel
mailing list