haskell/cabal — pull request #1879 by kosmikus (2014-05-19 22:09:02+00:00)
Title: Defer flag choices by default

This is a rather significant change in behaviour of the modular solver, but after a couple of experiments, I think it's probably the right thing to do.

The issue is described best by @dcoutts at https://github.com/bos/aeson/issues/177#issuecomment-33715377 . Flags are currently often abused (well, actually, probably most of the time) to specify a weak choice that's supposed to be inferred by what's currently installed on the system, rather than a strong choice that should actively influence what gets installed and what not.

Ideally, we'd have a way to specify in `.cabal` files how each flag should behave. These changes prepare the solver for that, but until the explicit information is present, fills in the info whether a flag is weak or strong as follows: automatic flags are now by default weak, manual flags are strong. There's a flag `--strong-flags` that makes all flag choices strong as they used to be.

We might want to be careful with merging this one to the 1.20 branch, as it's not technically a bugfix, but a change in heuristics. It's going to make some situations better and potentially others worse. We'll need some experience in practice to see whether it's the right tradeoff.