Skip to content
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

We need a functional spec. #62

Open
johntyree opened this issue Nov 7, 2015 · 2 comments
Open

We need a functional spec. #62

johntyree opened this issue Nov 7, 2015 · 2 comments

Comments

@johntyree
Copy link
Contributor

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?

@johntyree
Copy link
Contributor Author

After some discussion, we will prefer to install the latest version of every package that needs to be changed.

  1. This is what enstaller currently does.
  2. This makes it easy to understand what should happen in most cases.
  3. This allows us to try simply pushing everything to the latest version before running the solver at all.

@johntyree
Copy link
Contributor Author

For another open question about behavior see #43 (comment)

@cournape cournape modified the milestone: 0.2 Dec 22, 2015
@cournape cournape modified the milestones: 0.2, 0.3 Apr 1, 2016
@cournape cournape modified the milestone: 0.3 May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants