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

I'm using a development cut of cabal install from a few weeks ago, so this may not be relevant anymore (I'll upgrade soon to try the changes to --enable-tests and install soon), but I found this behavior odd: When using 'cabal(-dev) install --only-dependecies --solver=modular --upgrade-dependencies' to test my package with new dependencies, I am then told I need to use the flag '--force-reinstalls'. Shouldn't this be implied by '--upgrade-dependencies'? Thanks, Antoine

On 11 February 2012 18:03, Antoine Latter
I'm using a development cut of cabal install from a few weeks ago, so this may not be relevant anymore (I'll upgrade soon to try the changes to --enable-tests and install soon), but I found this behavior odd:
When using 'cabal(-dev) install --only-dependecies --solver=modular --upgrade-dependencies' to test my package with new dependencies, I am then told I need to use the flag '--force-reinstalls'.
Shouldn't this be implied by '--upgrade-dependencies'?
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. Opinions welcome. Duncan

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 occurs. 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. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com

I'm using a development cut of cabal install from a few weeks ago, so this may not be relevant anymore (I'll upgrade soon to try the changes to --enable-tests and install soon), but I found this behavior odd:
When using 'cabal(-dev) install --only-dependecies --solver=modular --upgrade-dependencies' to test my package with new dependencies, I am then told I need to use the flag '--force-reinstalls'.
Shouldn't this be implied by '--upgrade-dependencies'?
No, it should not be implied by --upgrade-dependencies. There could be perfectly valid solutions for --upgrade-dependencies without any reinstallations. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com
participants (3)
-
Andres Löh
-
Antoine Latter
-
Duncan Coutts