Repository navigation
Key already returned dependencies on repo and package - #59
Merged
Merged
Conversation
PackageLister.dependencies_as_incompatibilities/4 read already_returned
with a {repo, package} key but wrote it with the package name, so the
lookup never matched. Revisiting a version of a package returned the
same dependency incompatibilities again, and the solver added the
duplicates to its incompatibility set during backtracking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PackageLister.dependencies_as_incompatibilities/4readsalready_returnedwith a{repo, package}key but writes it with the package name, so the lookup never matches. The read side changed to{repo, package}in 2bbdcd4 and the write side didn't. When the solver backtracks to another version of a package, it adds that version's dependency incompatibilities again even when one it already added covers the version.I traced a solve through Hex's vendored copy that backtracks from foo 2.0.0 to 1.0.0. It added 7 incompatibilities, one a duplicate of
every version of "foo" depends on "bar ~> 1.0". With the key fixed it adds 6 and finds the same solution. The newPackageListertest fails without the fix.