-
Notifications
You must be signed in to change notification settings - Fork 701
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
Better messages when constraint from user config makes us not pick a package #373
Comments
(Imported comment by @dcoutts on 2008-10-23) Chucking some extra constraints in is easy. The hard part is tracking them so we can report where they came from and if they were used. Saying that a package was not used due to blacklisting is quite hard really. I guess one could inspect the constraints at the end for each package and check if any packages were excluded only due to the specific blacklist constraint. If it was then we could check if that package would have been the preferred version vs the version actually picked. This relies closely on the way in which the current solver works and what internal method it uses and the information it collects. That's not great because we would like to make the algorithm pluggable so that we can easily experiment with improved algorithms. |
(Imported comment by @dcoutts on 2008-12-17) We seem mostly to have given up the pluggable solver interface. It now is explicitly given a set of constraints. The obvious thing to do is to attach reasons to each of the input constraints. Blacklisting could be one such thing. Avoiding broken packages similarly. See also #470. |
(Imported comment by @kosmikus on 2009-03-11) In the modular solver, constraints have reasons already. This is related to #925. |
(Imported comment by @kosmikus on 2012-03-08) The following works now:
However, the following remains to be done:
|
I think this issue is too vague, and I'd vote for closing it as such. On top of that, constraint solving is a rather complicated process, results of which will always be hard to explain. I'd welcome more focused issues (e.g. #7993) than this one. |
I think "Make it easier to work with several config files" and "Allow a single config file line to contain a list of constraints" is in a way fixed in #7783. What probably remains unsolved is "Distinguish config file constraints from command-line constraints in error messages". However, given that nobody implemented nor discussed that here in 10 years, if anybody is still interested, please search for newer similar tickets and perhaps open a new ticket with precisely this content, ideally giving a new use case, taking #7783 into consideration and sketching how the errors should look like. Closing this one as stale. Thank you everybody. |
@ezyang: See below, you can specify constraints to exclude packages, the real bug is error messages
(Imported from Trac #380, reported by guest on 2008-10-23)
Sometimes there are packages on hackage that I don't want to install, perhaps ever. Maybe there is a buggy release I'm trying to avoid, or something of that nature.
So, my proposal is a user defined blacklist. I think the version specification could work just like that of a .cabal file.
I also think cabal should tell you when it skips a dependency due to blacklisting.
The text was updated successfully, but these errors were encountered: