-
Notifications
You must be signed in to change notification settings - Fork 724
Description
This idea was inspired by @georgefst's comment in #10470.
The solver currently stops searching as soon as it finds one solution. That solution maximizes each of the variables (package versions, flags, etc.) locally, but it may not be the user's most preferred solution overall. For example, the solver might choose the newest version of package A and a very old version of package B, when the user would rather use a slightly older version of package A in exchange for a newer version of package B.
It would be useful to sometimes have the solver look beyond the first solution. We could first experiment with finding all of the local maxima in order to measure performance and determine whether it is true that there is usually only one local maximum, as suggested in the comment above. If there are usually only one or a few maxima, then I think that we could turn this into a useful feature, similar to #2860. We could either apply some simple heuristics to find the best solution outside of the solver, like avoiding deprecated/non-preferred versions or extremely old versions, or list the solutions so that the user can choose one using their own criteria.