Adding a world file to cabal-install

Peter Robinson thaldyron at gmail.com
Mon Feb 9 05:43:28 EST 2009


2009/2/9 Andrea Vezzosi <sanzhiyan at gmail.com>:
>> 1. The world file only contains the list of package names and versions
>> as requested by the user. I suppose that's all that's needed for
>> rebuilding, right?
>
> We also need the values for the flags specified by the user, i think.

True, so currently the whole UnresolvedDependency record is written to
the world file. Now about those flags, at the moment nothing stops
you from typing

$ cabal install world someOtherPkg --flags="someflag"

which installs all packages from world and someOtherPkg, and also adds
someOtherPkg to world if it wasn't present yet. However, "someflag" is
only set for someOtherPkg, while the packages in world are built with the
flags specified in the world file, which might be counterintuitive.

Alternatively, we could simply disallow installing other packages along
with world, i.e.
$ cabal install world
would be the only way to install world.


Peter



More information about the cabal-devel mailing list