patch applied (packages/regex-posix): Make setup script compile again after recent Cabal changes

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Sep 1 19:52:31 EDT 2007


On Sat, 2007-09-01 at 19:40 +0200, Sven Panne wrote:
> On Saturday 01 September 2007 19:37, Duncan Coutts wrote:
> > On Sat, 2007-09-01 at 04:56 -0700, Sven Panne wrote:
> > > Sat Sep  1 04:55:36 PDT 2007  sven.panne at aedion.de
> > >   * Make setup script compile again after recent Cabal changes
> >
> > BTW, as far as I can see, this Setup.hs is no longer needed. If it read
> > it correctly, all it does is implement a --ghc-option= flag. Cabal now
> > does that itself --ghc-args= or --ghc=arg=
> 
> I've just copied the Setup.lhs from regex-base, because that worked (and I am 
> currently not interested in the Cabal-API-of-the-day).

Indeed, I recommend not putting any custom code in Setup.(l)hs unless
it's absolutely essential. If we want to keep making improvements to
Cabal's internal code and adding features we will inevitably have to
continue making changes to the hooks api and other internal apis.

At the moment the design of the hooks api is very fragile. Any change
breaks all Setup.lhs programs. We've don't yet really know what the
hooks api should look like, but we expect there will be some significant
change in the next version. Hopefully we can come up with a design that
is less fragile, for example using a Configure/Build monad rather than
passing in lots of information a separate arguments, so that we could
add more information without breaking existing hooks users.

On the other hand we can make much stronger stability guarantees about
the .cabal file format.

> So probably all regex-*/Setup.lhs could be nuked...

Or at least replaced with the default one that never breaks.

Duncan



More information about the cabal-devel mailing list