build-depends contraints in a .cabal file

Can I specify an equality constraint in the build-depends field of a .cabal file? This would say that I want one specific version (because all the rest of my packages are compiled against that version and I'm getting type-checking errors trying to install the new package). neither
build-depends: foobar = 3.0.1
or
build-depends: foobar-3.0.1
seem to work. Do I have any choices other than re-compiling everything? Thanks, Antoine

Am Dienstag, 19. Februar 2008 03:05 schrieb Antoine Latter:
Can I specify an equality constraint in the build-depends field of a .cabal file? This would say that I want one specific version (because all the rest of my packages are compiled against that version and I'm getting type-checking errors trying to install the new package).
neither
build-depends: foobar = 3.0.1
or
build-depends: foobar-3.0.1
seem to work.
Do I have any choices other than re-compiling everything?
Thanks, Antoine
I think, you should use == instead of =. Best wishes, Wolfgang

On Mon, 2008-02-18 at 20:05 -0600, Antoine Latter wrote:
Can I specify an equality constraint in the build-depends field of a .cabal file? This would say that I want one specific version (because all the rest of my packages are compiled against that version and I'm getting type-checking errors trying to install the new package).
neither
build-depends: foobar = 3.0.1
or
build-depends: foobar-3.0.1
seem to work.
Do I have any choices other than re-compiling everything?
As Wolfgang says, use ==. I should note that I'm also just about to add detection for this kind of problem where we end up getting inconsistent versions of installed packages. In future you'll get a warning like: Configuring Foo-1.0... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package rss-3000.0.1 requires HaXml-1.13.3 package Foo-1.0 requires HaXml-1.19.2 http://hackage.haskell.org/trac/hackage/ticket/220 Separately we're also trying to add a: cabal configure --constraint "HaXml < 1.19" construct to let users add additional constraints on the configure command line. http://hackage.haskell.org/trac/hackage/ticket/224 This should be useful in the above situation until we have something more automatic, though the real purpose is to make it easier for people to test with various versions of deps and to allow cabal-install to specify exact dependencies after it has constructed its install plan. BTW, if you have a suggestion for a better command line flag name then do say. Duncan
participants (3)
-
Antoine Latter
-
Duncan Coutts
-
Wolfgang Jeltsch