install with '--upgrade-dependencies' requires '--force-reinstall'

Andres Löh andres at
Sat Feb 11 19:54:59 CET 2012

> We've not entirely decided what to do with the reinstall check. My
> preference for the behaviour is that it should check if any packages
> will be broken by the reinstall (not including the ones being
> installed themselves). I think this should do the right thing in most
> cases.

My point is that it's undecidable whether the system will be broken.
We have no full visibility of all package databases that may be on the
system. We can only see the ones that have been specified for the
current invocation of cabal. The conservative approach is that any
reinstallation is potentially dangerous.

One current exception are packages that consist exclusively of
executables. They can be safely reinstalled, yet the warning still

I'm also ok with disabling the warning for reinstallation of
explicitly named target packages if --reinstall is already specified.
This includes the case of saying "cabal install --reinstall" in a
development directory.

In all other cases, I think --force-reinstalls should be necessary.

I'm always in favour of providing more information rather than less.
So the point that Duncan raises is still valid: as long as we can
already see packages that are most likely going to be broken, we
should actually determine and print them explicitly.


Andres Löh, Haskell Consultant
Well-Typed LLP,

More information about the cabal-devel mailing list