Cabal upload issue

Hi all, I'm in the process of trying update the revisions of wx (part of wxHaskell) on hackage. I'm getting an error I find slightly surprising: "400 Error in upload The dependency 'build-depends: base' does not specify an upper bound on the version number. Each major release of the 'base' package changes the API in various ways and most packages will need some changes to compile with it. The recommended practise is to specify an upper bound on the version of the 'base' package. This ensures your package will continue to build when a new major version of the 'base' package is released. If you are not sure what upper bound to use then use the next major version. For example if you have tested your package with 'base' version 2 and 3 then use 'build-depends: base >= 2 && < 4'." In this case, we have the following in wx.cabal Library if flag(splitBase) build-depends: base >= 3, wxcore >= 0.12.1.1, stm else build-depends: base < 3, wxcore >= 0.12.1.1, stm Is this a bug, or am I doing something stupid? I should point out that this builds perfectly on my machine. Regards Jeremy

Jeremy O'Donoghue wrote:
Hi all,
I'm in the process of trying update the revisions of wx (part of wxHaskell) on hackage.
I'm getting an error I find slightly surprising: ... Library if flag(splitBase) build-depends: base >= 3, wxcore >= 0.12.1.1, stm
Change this last line to base >= 3 && < 5 to get rid of the warning. I think the idea is that if base becomes version 5, it will likely break your code, so you should specify ahead of time that this library isn't currently designed to work with a version of base beyond 4. That way when someone installs your package in the future and you haven't tested with base 5, cabal will know to use base 4 for your library. Thanks, Neil.

Although it might be a pain in the arse to some degree, is there any reason why 'base' is considered special? As an example, I've come across a fair number of libraries/apps that (presumably) compile against a previous version of OpenGL, but not the current latest. Given it's impossible to test any package against libraries that don't yet exist, shouldn't the upper bound be required for all package dependencies? Just curious. :) ta, Sam -----Original Message----- From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Neil Brown Sent: 12 November 2009 14:36 To: Jeremy O'Donoghue Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Cabal upload issue Jeremy O'Donoghue wrote:
Hi all,
I'm in the process of trying update the revisions of wx (part of wxHaskell) on hackage.
I'm getting an error I find slightly surprising: ... Library if flag(splitBase) build-depends: base >= 3, wxcore >= 0.12.1.1, stm
Change this last line to base >= 3 && < 5 to get rid of the warning. I think the idea is that if base becomes version 5, it will likely break your code, so you should specify ahead of time that this library isn't currently designed to work with a version of base beyond 4. That way when someone installs your package in the future and you haven't tested with base 5, cabal will know to use base 4 for your library. Thanks, Neil. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Thu, 2009-11-12 at 17:37 +0000, Sam Martin wrote:
Although it might be a pain in the arse to some degree, is there any reason why 'base' is considered special?
As an example, I've come across a fair number of libraries/apps that (presumably) compile against a previous version of OpenGL, but not the current latest.
The plan eventually is to do this for all packages that opt-in to following the PVP[1]. Base follows the PVP and it's a bit special since it's the single package that causes most breakage when new major versions come out. So we're dealing with part of the problem now as a special case and the rest of the problem later when we've got the appropriate infrastructure.
Given it's impossible to test any package against libraries that don't yet exist, shouldn't the upper bound be required for all package dependencies?
True, however when you write that dependency you have no idea what that upper bound ought to be unless you know the package is following some kind of version policy. That's why we would only enforce it for packages that opt-in to the PVP. [1]: http://www.haskell.org/haskellwiki/Package_versioning_policy Duncan
participants (4)
-
Duncan Coutts
-
Jeremy O'Donoghue
-
Neil Brown
-
Sam Martin