Skip to content

Add test case for backjumping when dependencies are not linked #3363

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

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

grayjay
Copy link
Collaborator

@grayjay grayjay commented Apr 20, 2016

This is another test for the issue described in #3327. The previous test started passing after #3221 was merged. I found this test case with QuickCheck and tried to clean it up, but, unfortunately, it's still messy. The failure only occurs with a specific goal order.

The solver must backtrack to avoid linking 1.D. However, none of the conflict sets at level 6 contain 1.D. 1.D should be added on the line with the message "dependencies not linked".

targets: C, A, B
constraints:
  stanzas A test (unknown source)
  stanzas B test (unknown source)
  stanzas C test (unknown source)
  stanzas D test (unknown source)
  stanzas D test (unknown source)
preferences:
strategy: PreferLatestForSelected
reorder goals: False
independent goals: True
avoid reinstalls: False
shadow packages: False
strong flags: False
max backjumps: infinite
[__0] trying: 0.C-1.0.0 (user goal)
[__1] trying: 0.D-2.0.0 (dependency of 0.C-1.0.0)
[__2] trying: 1.A-1.0.0 (user goal)
[__3] trying: 1.B-1.0.0 (dependency of 1.A-1.0.0)
[__4] trying: 1.D~>0.D-2.0.0 (dependency of 1.B-1.0.0)
[__5] trying: 2.B~>1.B-1.0.0 (user goal)
[__6] trying: 2.D~>1.D-2.0.0 (dependency of 2.B-1.0.0)
[__7] rejecting: 2.B-1.0.0:!test (constraint from unknown source requires opposite flag selection)
[__7] rejecting: 2.B-1.0.0:*test (conflict: 2.D==2.0.0, 2.B-1.0.0:test => 2.D==1.0.0)
[__7] fail (backjumping, conflict set: 2.B, 2.D, 2.B-1.0.0:test)
[__6] trying: 2.D~>0.D-2.0.0
[__7] rejecting: 2.B-1.0.0:!test (constraint from unknown source requires opposite flag selection)
[__7] rejecting: 2.B-1.0.0:*test (conflict: 2.D==2.0.0, 2.B-1.0.0:test => 2.D==1.0.0)
[__7] fail (backjumping, conflict set: 2.B, 2.D, 2.B-1.0.0:test)
[__6] rejecting: 2.D-2.0.0 (multiple instances; conflict set: 0.C, 0.D, 2.B, 2.D)
[__6] rejecting: 2.D-1.0.0 (dependencies not linked: cannot make 2.D canonical member of {*0.D-2.0.0,1.D-2.0.0,2.D-2.0.0}; conflict set: 2.B, 2.D)
[__6] fail (backjumping, conflict set: 0.C, 0.D, 2.B, 2.D, 2.B-1.0.0:test)
[__5] rejecting: 2.B-1.0.0 (multiple instances; conflict set: 1.A, 1.B, 2.B)
[__2] fail (backjumping, conflict set: 0.C, 0.D, 1.A, 1.B, 2.B, 2.D, 2.B-1.0.0:test)
[__1] rejecting: 0.D-1.0.0 (conflict: 0.C => 0.D==2.0.0)
[__0] fail (backjumping, conflict set: 0.C, 0.D, 1.A, 1.B, 2.B, 2.D, 2.B-1.0.0:test)
Unit Tests
  UnitTests.Distribution.Client.Dependency.Modular.Solver
    Independent goals
      indepGoals4: FAIL (expected)
        Unexpected error:
        Could not resolve dependencies:
        trying: 2.B~>1.B-1.0.0 (user goal)
        trying: 2.D~>1.D-2.0.0 (dependency of 2.B-1.0.0)
        rejecting: 2.B-1.0.0:!test (constraint from unknown source requires opposite flag selection)
        rejecting: 2.B-1.0.0:*test (conflict: 2.D==2.0.0, 2.B-1.0.0:test => 2.D==1.0.0)
        Dependency tree exhaustively searched.
        (expected failure)

@edsko
Copy link
Contributor

edsko commented Apr 20, 2016

Great! Thanks.

@kosmikus
Copy link
Contributor

Yes, thanks a lot.

@grayjay grayjay deleted the test-3327 branch April 24, 2016 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants