3 ms·
Ideally, one would also prefer higher versions of each package. How much longer would it take to find a solution with the guarantee that there's no other soluti
by OscarCunningham 3y ago
Ideally, one would also prefer higher versions of each package. How much longer would it take to find a solution with the guarantee that there's no other solution with all packages at least as good?
- droelf 3y agoUnfortunately, it is sometimes not even possible to say which solution should be preferred because different branches lead to different sets of packages having higher versions. There is not really an "ultimate" heuristic to determine which of the two sets is better. However, users are always encouraged to add more constraints to shape the solution, and packagers encouraged to take good care of the metadata. At prefix we are quite interested in figuring out how we can help packagers to determine e.g. compatibility ranges more correctly by doing static analysis and such things.
- OscarCunningham 3y agoRight, but we could still ask for Pareto optimality: no way to make one package better, while keeping the rest at least as good.
- crabbone 3y agoIdeally, there should be a choice that allowed to look for the minimal and the maximal versions that satisfy given requirement. Developers usually want the newest, but maintainers usually want the oldest.
- JohnFen 3y ago> Ideally, one would also prefer higher versions of each package Ideally, yes. In practice? I know that I rather strongly prefer not to use the latest version of any piece of software.
- wofo 3y agoAuthor here. I glossed over this in the article, but the solver is actually privileging higher versions as you suggest. In the "set" step, when we arbitrarily set a variable to true, we have a heuristic that picks the highest possible version of the package.