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

Andres Löh andres at well-typed.com
Thu Feb 16 18:07:15 CET 2012


> Can you explain why the modular solver filters out '--enable-tests'
> for packages without tests? It doesn't seem like it should affect the
> generated dependency list.

It's the natural thing to do. The modular solver will not even
generate a choice node in the search tree if there aren't any test
stanzas, so an --enable-test constraint will simply have no effect on
such a package. The only other option would be to generate such a node
for every single package, but that'd just make the search tree larger
for no benefit.

> (I still want to patch the Cabal lib for this because it made me aware
> of the fact that the 'test' phase behaves differently from every other
> phase, but now I will postpone it until I do the other fixes the test
> runner needs.)

Right. I agree. But it should become an independent fix then, right?

Cheers,
  Andres

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



More information about the cabal-devel mailing list