Notice for package authors
kahl at cas.mcmaster.ca
kahl at cas.mcmaster.ca
Thu Jun 4 05:13:25 EDT 2009
[Not replying to haskell-cafe since not subscribed.]
> There is no way for the tools to discover if you mean base 3 or 4 and
> yet most packages break when we pick the wrong one. You must specify an
> upper bound so that your package does not break when the next major
> version of the base library is released.
> For example, if you've tested with base 3 and 4 then use:
> build-depends: base >= 3 && < 5
Then ``build-depends'' is a misnomer because most packages will most likely
not DEPEND on the fact that the used base package has version less than 5.
This misnomer is one major source of my uneasiness with cabal.
I would like to propose ``tested-with'' as a better name,
and would like to see a way for users to easily test with a version
I did not have avaliable, and report that back (perhaps to hackage).
./Setup configure --accept="base==5.9"
(long name to make sure users know they are going to send a message.)
The flag --accept would add a disjunction to the ``tested-with'' formula
(to allow the build), in contrast with the semantics documented
for the flag --constraint in the output of ./Setup --configure --help,
which adds a conjunction.
Probably a ``--force="base==5.9"'' would also make sense,
it would then be an abbreviation for
(Sequence of the two flags would matter!)
Of ocurse, I can, for example, honestly only write
tested-with: base `elem` [2.1.1, 188.8.131.52, 184.108.40.206, 220.127.116.11]
because those are the versions I happen to have lying around,
and you probably would like to allow building with
== 2.1.1.* || == 3.0.1.* || (>= 18.104.22.168 && < 3.0.4) || == 4.1.*
without hesitation, and at least trying with
(>= 2.1.1 && < 2.2) || (>= 3.0.1 && < 3.1) || == 4.1.*
according to the version convention.
But in general there is no guarantee that a give package actually
implements that, or does hackage test for compliance with the
Yet another problem is that if I write
pkg1 == v1_1 || == v1_2
pkg9 == v9_1 || == v9_2
, I probably won't have tested all 2^9 combinations...
So I really want to write something like:
(pkg1 == v1_1 && pkg2 == v2_1) ||
(pkg1 == v1_1 && pkg2 == v2_2) ||
(pkg1 == v1_2 && pkg2 == v2_2)
Then you may want to at least warn the user who has only
(pkg1 == v1_2 && pkg2 == v2_1)
More information about the Libraries