On Wed, Dec 5, 2012 at 11:13 AM, Jason Dagit <dagitj@gmail.com> wrote:
Let's say you are working in a directory foo that contains a cabal file for package foo. When you type 'cabal-dev install', cabal-dev looks at foo.cabal in the current directory, it uses it to calculate constraints and then installs the dependencies locally that satisfy those constraints. It also has an install-deps command if you just want to install the deps but not build/install foo. Additionally, if you want to use locally modified versions of the dependencies use 'cabal add-source <path to dep>' from the foo directory to add your locally modified package to foo's index so that subsequent cabal-dev operations can find it and install it.
Basically, don't install the deps by hand. Let cabal-dev figure out the mutually compatible versions and install that *locally* to where you're building foo.As for the problem of recursively rebuilding the deps, I think 'cab' [1] solves this but I haven't tried it.I also thought about adding process, bytestring and other global
packages to the list of constraints in ~/.cabal/config. Would this be
a good approach, or will it lead to bigger headaches in the future
(for instance, in the form of programs that just cannot be installed
at all)?Adding these constraints will come back to bite you. That's been my experience.
Also, is there any way to detect potential dependency hells without
having to install a package? (Some tool that will analyse the
dependency information (statically) and determine more strict or
incorrect upper and lower bounds for the dependencies of a package.)--dry-run?Jason
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe