enthought / enthought/sat-solver
We need a functional spec.
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Having spent about two weeks exploring the code base now, it's clear to me that it's _not_ clear exactly how dependencies should be resolved in non-trivial cases.
We should write a small document that explains which direction we favor when tradeoffs have to be made. Then I can go through all of the yaml scenario files and explicitly write out the expected transaction for each to serve as a reference and test. Without this, it's really hard to know if the solver is doing the right thing or not.
As an example, consider this reduced version of `scipy_upgrade.yaml`:
```
packages:
- MKL 10.3-1
- libgfortran 3.0.0-1
- libgfortran 3.0.0-2
- numpy 1.8.1-1; depends (MKL == 10.3-1)
- numpy 1.9.2-1; depends (libgfortran ~= 3.0.0, MKL == 10.3-1)
- scipy 0.14.0-3; depends (numpy ~= 1.8.1, libgfortran ~= 3.0.0)
- scipy 0.15.1-1; depends (numpy ~= 1.8.1, libgfortran ~= 3.0.0, MKL ~= 10.3)
- scipy 0.15.1-2; depends (numpy ~= 1.9.2, libgfortran ~= 3.0.0, MKL ~= 10.3)
request:
- operation: "install"
requirement: "scipy > 0.15"
installed:
- MKL 10.3-1
- libgfortran 3.0.0-1
- numpy 1.8.1-1
- scipy 0.14.0-3
transaction:
- kind: "install"
package: "MKL 10.3-1"
- kind: "install"
package: "libgfortran 3.0.0-2"
- kind: "install"
package: "numpy 1.9.2-1"
- kind: "install"
package: "scipy 0.15.1-2"
```
The transaction listed would suggest that we want to take the newest version of `scipy` available and upgrade everything else as needed to achieve that. That seems reasonable, but it is not what we claim to want to do, which is to prefer to leave installed packages alone if possible. Instead, what the solver actually gives us is quite different.
```
transaction:
- kind: "update"
from: "scipy 0.14.0-3"
to: "scipy 0.15.1-1" # note the build number
```
It's an older build of `scipy 0.15.1` to avoid updating `numpy`. This actually _is_ the right solution if your priority is to change as little possible, which makes me think that is probably not an accurate description of what we'd like to prioritize.
At any rate, we need to make this concrete somewhere. Which is correct? Is it ever correct to prefer an older build number? Or an older version altogether?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.