From running benchmarks while changing the code:
* It doesn't seem to slow things down to *always* try to "hit 0"
when minimizing
* It does seem to slow things down if the "<= 0" constraint is
expressed using <= instead of "forbid the terms with non-zero
weights"
This change also fixes a bug where we required terms with zero
weights to be 0.
Lots of things happened here:
* Refactored how cost minimization is expressed
* Cost function now distinguishes major/minor/patch/rest
* Order of terms is improved
* Reachability analysis of catalog makes benchmarks much faster
* Lock down versions of special packages before solving rest (perf)
* Explaining conflicts no longer crashes on cycles
* Antigravity for patches (and wrap nums, prereleases, etc.) so that
we take bug fixes to indirect dependencies.
TODO:
* Refuse to make breaking changes to root reps
* Make sure we don't have antigravity changing any previous solutions
for no reason
* Proper pre-release handling
* Unit tests
It even explains conflicts. It just doesn't spit out the list of
other constraints on conflicted packages yet (easy to do).
Left to do:
- Remove old solver code
- Call nudge()
- More nuanced cost function
- Clean up solver.js a little
- Proper handling of pre-release versions
- Lots more tests of different scenarios!