
All, I'm trying to do a Cabal-1.6 release, in time for ghc-6.10. Here's an interim update. There are 7 packages on hackage where the latest version has a Setup.hs script that works with Cabal-1.4 but does not compile with Cabal-1.6. That's actually not too bad. It's been a lot worse in the past, and we have many more packages now. Here's the list and explanations: * ForSyDe-3.0 Uses the copyDest field from CopyFlags. These record types now use an equivalent of Maybe so they can be empty rather than always containing a default value. It's useful, but also kind of annoying in places. It's an easy fix. * MissingPy-0.10.0 * Takusen-0.8.3 * HDBC-postgresql-1.1.4.0 Imports writeHookedBuildInfo from Distribution.PackageDescription This one is a bit annoying. I tried to split up the Distribution.PackageDescription module a bit, because it was something like 1,700 lines long. I moved the parsing out into Distribution.PackageDescription.Parse. Some packages of course sill expect to get writeHookedBuildInfo from the previous location. I could make it still work by using recursive modules, but I worry what that would do to the process of bootstrapping Cabal (especially with hugs or nhc). Or I could re-merge the modules into one massive module again. Or I could say, it's only three packages broken, it's all ok. While the fix for these three packages' Setup scripts is trivial, there is not fix that will make them compile with old and new versions of the lib. Suggestions welcome. * alex-2.2 * happy-1.17 Imports buildVerbose from Distribution.Simple.Setup ( BuildFlags(..) ) however the flag has been renamed to buildVerbosity and with a different type. I would export a compat function but it would not help here since the Setup script expects it to be a record selector from BuildFlags. Cabal-1.4 contained a dodgy hack to make this continue to work, but I'm not doing that again. If I added a compat function then we could at least make it work with both ghc/cabal versions with a single implementation. So I might do that and do point releases of these packages, if Simon thinks that's ok. Really of course both packages should stop calling an external perl and other similar madness. * hsql-odbc-1.7 Imports Distribution.Setup which has been deprecated since at least Cabal-1.2. This package is unmaintained so it's not so surprising. Duncan

I could say, it's only three packages broken, it's all ok. While the fix for these three packages' Setup scripts is trivial, there is no fix that will make them compile with old and new versions of the lib.
Suggestions welcome.
Cabal-version-dependent Setup.hs?-) http://hackage.haskell.org/trac/hackage/ticket/326 One can hack something up without Cabal support (have a simple Setup.hs that checks the Cabal version and runs one of the actual Cabal-version-specific Setup-<version>.hs that do the work)- see the comments on that ticket. But wouldn't it be nice if Cabal would start supporting that directly, to sort this once and for all?-) Should also help with the other issues, Claus

On Thu, Oct 9, 2008 at 8:55 PM, Duncan Coutts
* ForSyDe-3.0
Uses the copyDest field from CopyFlags. These record types now use an equivalent of Maybe so they can be empty rather than always containing a default value. It's useful, but also kind of annoying in places. It's an easy fix.
If possible at all, what would be the best way to make it compatible with both versions of CopyFlags? Thanks

On Fri, 2008-10-10 at 01:26 +0200, Alfonso Acosta wrote:
On Thu, Oct 9, 2008 at 8:55 PM, Duncan Coutts
wrote: * ForSyDe-3.0
Uses the copyDest field from CopyFlags. These record types now use an equivalent of Maybe so they can be empty rather than always containing a default value. It's useful, but also kind of annoying in places. It's an easy fix.
If possible at all, what would be the best way to make it compatible with both versions of CopyFlags?
I don't think there's a way to make it work with Cabal-1.2, 1.4 and 1.6. If you make it work with 1.6 it'll not work with 1.2. But it can work with 1.4 and 1.6 at the same time, or with 1.2 and 1.4 at the same time. Just not all three simultaneously. Duncan

On Thu, 2008-10-09 at 11:55 -0700, Duncan Coutts wrote:
All,
I'm trying to do a Cabal-1.6 release, in time for ghc-6.10.
Here's an interim update.
There are 7 packages on hackage where the latest version has a Setup.hs script that works with Cabal-1.4 but does not compile with Cabal-1.6.
Actually it's 8. For some reason I missed lhs2tex. Cabal-1.4 had several compat hacks added to enable lhs2tex to be made to work. Those hacks are gone in Cabal-1.6.
That's actually not too bad. It's been a lot worse in the past, and we have many more packages now.
Further details. I tried to build 685 packages from hackage with ghc-6.8 using Cabal-1.4.0.2 and Cabal-1.6.0.0. Here are the numbers: * Cabal-1.4.0.2: 547 built ok * Cabal-1.6.0.0: 541 built ok So there are (at least) 6 packages that worked with Cabal-1.4.0.2 and now fail with Cabal-1.6. I say "at least" because some failed for me with Cabal-1.4 but only because I'm missing C libs. I don't have an accurate count of that subset. But I don't think it's that large. If we assume it's about 12 newly failing packages then that's under 2%. If I remember correctly we had 8-10% breakage due to Cabal from the 1.1.6 to 1.2 transition with ghc-6.6 to 6.8. So it's rather better this time. This set of course overlaps with the 8 for which the Setup.hs fails to compile. The reason it's not simply an addition to the earlier 7 is because some of those failed to configure with Cabal-1.4 even though the Setup.hs compiled. In a couple cases that was due to C libs. So here's a breakdown of the 6 that are new failures and a couple that definitely fail with Cabal-1.6 and probably would have worked with Cabal-1.4 if I'd had the C libs installed. Failed due to Setup.hs not compiling: * ForSyDe-3.0 * MissingPy-0.10.0 * Takusen-0.8.3 * alex-2.2 * happy-1.17 * lhs2tex-1.13 These two also have Setup.hs scripts that no longer compile * hsql-odbc-1.7 * HDBC-postgresql-1.1.4.0 hsql-odbc never built anyway because hsql does not compile with ghc-6.8. HDBC-postgresql probably would have built for me with Cabal-1.4 if I'd had the postegresql C libs installed. So it's part of the "at least" category which failed with 1.4 only because I didn't have the C libs. Other failures: * HsPerl5 HsPerl5 fails with: Reading parameters from ./HsPerl5.buildinfo setup: HsPerl5.buildinfo:4: Parse of field 'ld-options' failed. The problem here is parsing "-Wl,-E". It is a Cabal parsing bug. It worked in old versions of Cabal but only because they incorrectly interpreted "," as a separator. By luck this worked. Apparently passing -Wl -E to gcc rather than -Wl,-E was not enough to cause visible breakage. The current cabal parser for ld-options only looks for spaces as separators but currently does not allow ',' inside tokens. I'll fix this before the release. Duncan

* Takusen-0.8.3
Imports writeHookedBuildInfo from Distribution.PackageDescription
While the fix for these three packages' Setup scripts is trivial, there is not fix that will make them compile with old and new versions of the lib.
For Takusen I'd be happy to fix the Setup and require the latest Cabal in order to build. That's what we've done in the past. Alistair ***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. *****************************************************************

Duncan Coutts wrote:
* alex-2.2 * happy-1.17
Imports buildVerbose from Distribution.Simple.Setup ( BuildFlags(..) ) however the flag has been renamed to buildVerbosity and with a different type. I would export a compat function but it would not help here since the Setup script expects it to be a record selector from BuildFlags. Cabal-1.4 contained a dodgy hack to make this continue to work, but I'm not doing that again.
If I added a compat function then we could at least make it work with both ghc/cabal versions with a single implementation. So I might do that and do point releases of these packages, if Simon thinks that's ok.
Really of course both packages should stop calling an external perl and other similar madness.
I can stop calling Perl, but I still need to run CPP, so I still need the runProgram stuff, which means I still need buildVerbose/buildVerbosity. As far as I can see, you could export a compatibility shim called buildVerbose without any difficulty, all I have to do is remove the explicit import list. Or is there a better fix you had in mind? Cheers, Simon

On Fri, 2008-10-10 at 16:13 +0100, Simon Marlow wrote:
As far as I can see, you could export a compatibility shim called buildVerbose without any difficulty,
Done.
all I have to do is remove the explicit import list. Or is there a better fix you had in mind?
Patches for alex and happy attached. Their Setup.lhs now works with 1.2, 1.4 and 1.6 (1.6.0.1). Duncan

Duncan Coutts wrote:
On Fri, 2008-10-10 at 16:13 +0100, Simon Marlow wrote:
As far as I can see, you could export a compatibility shim called buildVerbose without any difficulty,
Done.
all I have to do is remove the explicit import list. Or is there a better fix you had in mind?
Patches for alex and happy attached. Their Setup.lhs now works with 1.2, 1.4 and 1.6 (1.6.0.1).
Thanks! New versions of Alex & Happy uploaded. Cheers, Simon

Bryan O'Sullivan wrote:
On Mon, Oct 13, 2008 at 1:58 AM, Simon Marlow
wrote: Thanks! New versions of Alex & Happy uploaded.
Where to? I only see 2.3 on Hackage, and haskell.org claims that Alex is still at 2.2.
Just on Hackage for the time being, I'll update the web pages after a bit of testing. There's already been a fix to Happy since I uploaded 1.18. Cheers, Simon
participants (6)
-
Alfonso Acosta
-
Bayley, Alistair
-
Bryan O'Sullivan
-
Claus Reinke
-
Duncan Coutts
-
Simon Marlow