hackage package dependencies and future-proof libraries
Posted
by yairchu
on Stack Overflow
See other posts from Stack Overflow
or by yairchu
Published on 2010-05-12T23:34:24Z
Indexed on
2010/05/13
0:34 UTC
Read the original article
Hit count: 353
In the dependencies section of a cabal file:
Build-Depends: base >= 3 && < 5, transformers >= 0.2.0
Should I be doing something like
Build-Depends: base >= 3 && < 5, transformers >= 0.2.0 && < 0.3.0
(putting upper limits on versions of packages I depend on)
or not?
I'll use a real example: my "List" package on Hackage (List monad transformer and class)
- If I don't put the limit - my package could break by a change in "transformers"
- If I do put the limit - a user that uses "transformers" but is using a newer version of it will not be able to use
lift
andliftIO
withListT
because it's only an instance of these classes of transformers-0.2.x
I guess that applications should always put upper limits so that they never break, so this question is only about libraries:
Shall I use the upper version limit on dependencies or not?
© Stack Overflow or respective owner