Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recommend --force-reinstalls #1201

Closed
wants to merge 2 commits into from

Conversation

soenkehahn
Copy link
Contributor

In case 'cabal install' selects destructive reinstalls it suggests '--force-reinstalls'. In my experience this is seldom what one wants since it is likely to destroy other installed libraries. It should additionally suggest '--avoid-reinstalls' and/or manually unregistering conflicting packages.

Feel free to rephrase the warning message.

'ghc-pkg unregister' in case 'cabal install' selects destructive
reinstalls
@23Skidoo
Copy link
Member

I don't think you can assume that the underlying compiler is GHC here.

@soenkehahn
Copy link
Contributor Author

@23Skidoo: Of course, you're right. Thanks.

@23Skidoo
Copy link
Member

@kosmikus Do you agree with this change?

@dcoutts
Copy link
Contributor

dcoutts commented Mar 7, 2013

I'm not convinced. It's often the case that --force-reinstalls is exactly what is needed. For example when hacking on a collection of related packages, making a change in a dependent package and then rebuilding. Of course it's going to break the others, but I'm rebuilding them so that's fine.

I'm happy with making the warning clearer and/or more fierce. I'm not sure that recommending --avoid-reinstalls is a good idea, I don't think the --avoid-reinstalls behaviour is often what you want (it means it'll select non-ideal versions, e.g. older ones, to avoid breaking existing ones).

@soenkehahn
Copy link
Contributor Author

I am not at all insisting on my specific wording. And I see your usecase where --force-reinstalls is what one wants. I still think it would be good to tell users that there are alternatives to --force-reinstalls.

Would you be happier with the warning if it mentioned the disadvantages of --avoid-reinstalls?

@kosmikus
Copy link
Contributor

kosmikus commented May 3, 2013

I'm not convinced either. I completely agree that the suggestion to use --force-reinstalls leads to people typing --force-reinstalls and subsequently complaining that everything is broken. However, --avoid-reinstalls in my experience is even less often what you want. It looks good in theory. But most of the time there are some old versions with missing upper bounds around, so you'll just turn a solver error into a build phase error.

@23Skidoo
Copy link
Member

Closing as rejected.

@23Skidoo 23Skidoo closed this Jul 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants