Skip to content

Fix construction of conflict sets during link validation - #3234

Closed
edsko wants to merge 8 commits into
haskell:masterfrom
edsko:pr/IndepConflictSets
Closed

edsko wants to merge 8 commits into
haskell:masterfrom
edsko:pr/IndepConflictSets

Conversation

@edsko

@edsko edsko commented Mar 19, 2016

Copy link
Copy Markdown
Contributor

NOTE: This commit contains four commits, not two; the first two are #3221.

In #2834 @GrayJay points out another conflict set construction bug. Actually, this is almost the same bug that was present in the check for the single instance restriction: we were forgetting to call simplifyVar on some variables before adding them to the conflict set.

This PR first adds @GrayJay 's test case (another excellent test, thank you very much! :) ) . The next commit just adds some comments to the test explaining what is going on. Commit number 3 just moves some code out of the Modular.Dependency module into two separate Var and ConflictSet modules; it does not make any actual changes to the semantics. The actual fix is in the final commit, which makes ConflictSet abstract and makes sure that whenever we add a variable to a ConflictSet, or check whether a variable is a member of a conflict set, that we call simplifyVar first. This fixes this particular test case and also makes me feel a lot less anxious about other such bugs still being present.

Pinging @kosmikus and @dcoutts .

sebright and others added 7 commits March 12, 2016 12:44
Not entirely sure if this is right; needs review by @kosmikus.

If correct, fixes #2843.
In preparation for making ConflictSet abstract.
for compatibility with older `containers` packages. Hopefully this will fix the
build error on 7.4.
@edsko

edsko commented Mar 19, 2016

Copy link
Copy Markdown
Contributor Author

Pushed commit to try to fix build error on 7.4.

@edsko

edsko commented Mar 19, 2016

Copy link
Copy Markdown
Contributor Author

New travis failure seems to be transient?

@23Skidoo

Copy link
Copy Markdown
Member

Restarted the build.

@23Skidoo

Copy link
Copy Markdown
Member

The remaining failure is due to -Werror:

Distribution/Client/Dependency/Modular/ConflictSet.hs:65:1: warning: [-Wredundant-constraints]
    • Redundant constraint: Ord qpn
    • In the type signature for:
           filter :: Ord qpn =>
                     (Var qpn -> Bool) -> ConflictSet qpn -> ConflictSet qpn

@edsko

edsko commented Mar 20, 2016

Copy link
Copy Markdown
Contributor Author

Oh FFS 😧 Final attempt :-)

@dcoutts

dcoutts commented Mar 28, 2016

Copy link
Copy Markdown
Contributor

I've merged these patches to the nix-local-build branch (along with all the other recent solver PRs).

@edsko

edsko commented Apr 23, 2016

Copy link
Copy Markdown
Contributor Author

This has been merged into and subsumed by #3357 .

@edsko edsko closed this Apr 23, 2016
@edsko
edsko deleted the pr/IndepConflictSets branch April 23, 2016 03:27
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.

5 participants