[Haskell-cafe] Cabal Config constraints vs. constraint

Christopher Reichert creichert07 at gmail.com
Mon Dec 22 18:40:38 UTC 2014


Hey everyone,

I am trying to add a list of version constraints to my global cabal
config (~/.cabal/config) using the `constraints` keyword. However, after
adding the list to the end of the ~/.cabal/config file and running
`cabal update`, I noticed this warning:

   $ cabal update
   Warning: /home/test/.cabal/config: Unrecognized field constraints on
   line 176
   Downloading the latest package list from hackage.haskell.org


I did find this issue annotated as a FIXME in the cabal source:
https://github.com/haskell/cabal/blob/64761550bb617ee5d9449512bd3e500489cfd491/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs#L408


It appears as though `constraints` are currently only supported in
cabal.config (and maybe cabal.sandbox.config)


Do individual constraints (e.g. `constraint:`) have the same effect as a
list of constraints?


Does the `constraint` setting work in both global (~/.cabal/config) and
local cabal.config the exact same way (especially if I have a long list
of them)

Is there any reason I would use individual constraints over a list of
constraints?


My assumption is that they work the same way in both ~/.cabal/config &&
cabal.config.


I'm considering patching the cabal source to support the `constraints`
setting in the ~/.cabal/config file. Is there any reason this might have
been passed up front?



More discussion here: https://github.com/fpco/stackage-server/issues/67


Any help or advice would be greatly appreciated. Thanks,

-Christopher



--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141222/feffc8b2/attachment.sig>


More information about the Haskell-Cafe mailing list