Repository navigation
Closed
Description
Here is a test case. It is very fragile, because the failure completely depends on the order that the solver chooses to solve for variables.
sebright@bca1eda
targets: D, E, F
constraints:
stanzas A test (unknown source)
stanzas B test (unknown source)
stanzas C test (unknown source)
stanzas C test (unknown source)
stanzas D test (unknown source)
stanzas E test (unknown source)
stanzas F test (unknown source)
preferences:
strategy: PreferLatestForSelected
[__0] trying: 0.D-1.0.0 (user goal)
[__1] next goal: 0.C (dependency of 0.D-1.0.0)
[__1] rejecting: 0.C-2.0.0 (conflict: 0.D => 0.C==1.0.0)
[__1] trying: 0.C-1.0.0
[__2] trying: 0.A-1.0.0 (dependency of 0.D-1.0.0)
[__3] trying: 1.E-1.0.0 (user goal)
[__4] next goal: 1.C (dependency of 1.E-1.0.0)
[__4] rejecting: 1.C~>0.C-1.0.0 (conflict: 1.E => 1.C==2.0.0)
[__4] trying: 1.C-2.0.0
[__5] trying: 1.B-1.0.0 (dependency of 1.E-1.0.0)
[__6] trying: 2.F-1.0.0 (user goal)
[__7] trying: 2.B~>1.B-1.0.0 (dependency of 2.F-1.0.0)
[__8] trying: 2.C~>1.C-2.0.0 (dependency of 2.B-1.0.0)
[__9] next goal: 2.A (dependency of 2.F-1.0.0)
[__9] rejecting: 2.A~>0.A-1.0.0 (dependencies not linked: cannot merge {*1.C-2.0.0,2.C-2.0.0} and {*0.C-1.0.0}; conflict set: 0.C, 1.C, 2.A, 2.B, 2.C)
[__9] rejecting: 2.A-1.0.0 (multiple instances)
[__9] fail (backjumping, conflict set: 0.A, 0.C, 1.C, 2.A, 2.B, 2.C)
[__8] trying: 2.C~>0.C-1.0.0
[__9] next goal: 2.A (dependency of 2.F-1.0.0)
[__9] trying: 2.A~>0.A-1.0.0
[_10] done
FAIL
message threw an exception: internal error: could not construct a valid install plan.
The proposed (invalid) plan contained the following problems:
Package C is required by several packages, but they require inconsistent versions:
package A-1.0.0 requires C-1.0.0
package B-1.0.0 requires C-2.0.0
Proposed plan:
Configured A-1.0.0 (.fake.A-1.0.0)
Configured B-1.0.0 (.fake.B-1.0.0)
Configured C-1.0.0 (.fake.C-1.0.0)
Configured C-2.0.0 (.fake.C-2.0.0)
Configured D-1.0.0 (.fake.D-1.0.0)
Configured E-1.0.0 (.fake.E-1.0.0)
Configured F-1.0.0 (.fake.F-1.0.0)
When 2.B is linked to 1.B, it adds its dependency 2.C to 1.C's link group. Then 2.C is linked to 0.C without a check for an existing link group. Since 0.C and 1.C have different versions, the install plan is invalid.
As far as I can tell, this could be fixed in D.C.Dependency.Modular.Linking.pickLink. If package 1.A is being linked with 0.A, the solver should backtrack if 1.A is already in a link group that cannot be merged with 0.A's link group.
Activity
23Skidoo commentedon Sep 27, 2015
/cc @kosmikus
kosmikus commentedon Oct 12, 2015
/cc @edsko
edsko commentedon Mar 19, 2016
Looking at this now.
Fix bug in link validation
ezyang commentedon Mar 31, 2016
For those playing along at home, this behavior would be toggled by the
--independent-goalsflag, but this flag is currently disabled because this feature does not really work.sebright commentedon Mar 31, 2016
@ezyang I was wondering why
--independent-goalswasn't exposed. What doesn't work? I thought it was very similar to setup dependencies, except that it applies to top-level goals instead of setup scripts.ezyang commentedon Mar 31, 2016
According to git blame, it was disabled in this commit:
commit d89fedd
Author: Andres Loeh [email protected] Mon Apr 16 05:30:24 2012
Committer: Andres Loeh [email protected] Mon Apr 16 05:30:24 2012
handling the solver options properly in config file
Other than that, I don't know.
Fix bug in link validation
Fix bug in link validation
Fix bug in link validation