patch: --enable-tests and --only-dependencies

Andres Löh andres at well-typed.com
Tue Feb 7 22:32:11 CET 2012


Hi Thomas.

> Andres: I had to make a few changes to the modular solver to get
> cabal-install to
> compile with the new constraints, but I didn't go far enough to actually have
> the solver pull in the dependencies. I recorded these changes as a separate
> patch to make the changes more obvious. You understand the solvers better than I
> do; if I'm taking the wrong approach, please let me know. Otherwise, this is
> what I did outside the solvers, if you want to implement test and benchmark
> dependencies for the modular solver:

Thanks for the patches. I'll take a closer look. One minor issue
that's rather unfortunate is that you need a (minor) change to Cabal,
not only cabal-install. For practical purposes, we're going to aim for
a cabal-install release in the not too distant future, but IMHO it
should work with the Cabal version that's shipped with ghc-7.4.1 and
not require another upgrade there.

Anyway, I'll see what I can do in order to adapt the modular solver.

> When a solver is building an InstallPlan, it just needs to configure each
> package respecting the constraints to get the correct list of dependencies.
> Packages that aren't specified as targets will have no constraints, so they
> should be built without '--enable-tests' and '--enable-benchmarks'.

Did you have to adapt the install-plan checker in any way?

Cheers,
  Andres

-- 
Andres Löh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com



More information about the cabal-devel mailing list