Fix glasser's "actual bug"

That's what we've been calling it.

To see this break and then work, add the following line above
the comment that begins `// lock down versions...`:

```
self.solution = logic.solveAssuming('bar');
```

And then run the test "previous solution no longer needed"
in input-tests.js.

The old code would lock down "bar", including the fact that it
is in the current solution.  The new code only locks down the version
number in the case where "bar" is used, so it is able to be optimized
away.
This commit is contained in:
David Greenspan
2015-03-10 00:09:09 -07:00
parent 76cf2f28ad
commit b68f91db99

View File

@@ -589,7 +589,7 @@ CS.Solver.prototype.getSolution = function (options) {
if (input.isRootDependency(package) ||
input.isInPreviousSolution(package) ||
input.isUpgrading(package)) {
logic.require(pvVar(package, v));
logic.require(Logic.implies(package, pvVar(package, v)));
}
});