Skip to content
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

Potential fix for Ambiguous Resolvable bug in transitive dependency resolution #367

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

butlern
Copy link
Contributor

@butlern butlern commented Feb 28, 2017

If an inexact dependency is specified, and a transitive dependency
with either a pin or a tighter bound is found later, Ambiguous
Resolvable can be raised. This is because the latest package is added
to processed_packages and then by the time the transitive dep runs
through the while resolvables loop, it's version doesn't match the
one found in processed_packages and Ambiguous Resolvable is raised.

This patch fixes it by 1) not raising an error if the packages don't
match and 2) after all resolvables are processed, loop back through
distributions and recreate the correct list of distributions from
resolvable_set.packages().

Fixes: #366

  If an inexact dependency is specified, and a transitive dependency
  with either a pin or a tighter bound is found later, Ambiguous
  Resolvable can be raised. This is because the latest package is added
  to processed_packages and then by the time the transitive dep runs
  through the while resolvables loop, it's version doesn't match the
  one found in processed_packages and Ambiguous Resolvable is raised.

  This patch fixes it by 1) not raising an error if the packages don't
  match and 2) after all resolvables are processed, loop back through
  distributions and recreate the correct list of distributions from
  resolvable_set.packages().

  Fixes: pex-tool#366
@kwlzn
Copy link
Contributor

kwlzn commented Apr 4, 2017

@butlern apologies for the delay in reviewing this and other pex PRs - have been swept up in end-of-quarter activities, but will carve out some time in the next couple days.

@butlern
Copy link
Contributor Author

butlern commented Apr 4, 2017

Hey no worries. I didn't want to have to bother you specifically. I sent that email to pants-devel because I didn't know if there was a single gatekeeper (you) or a group.

Copy link
Contributor

@kwlzn kwlzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me. the extra throwaway builds could be unfortunate performance-wise in some particular circumstances, but seems like something we can optimize later if it ends up being a problem.

thanks for the PR!

@kwlzn kwlzn merged commit 4a35669 into pex-tool:master Apr 7, 2017
This was referenced Apr 7, 2017
butlern added a commit to butlern/pex that referenced this pull request Jun 30, 2017
…-tool#367)

If an inexact dependency is specified, and a transitive dependency
with either a pin or a tighter bound is found later, Ambiguous
Resolvable can be raised. This is because the latest package is added
to processed_packages and then by the time the transitive dep runs
through the while resolvables loop, it's version doesn't match the
one found in processed_packages and Ambiguous Resolvable is raised.

This patch fixes it by 1) not raising an error if the packages don't
match and 2) after all resolvables are processed, loop back through
distributions and recreate the correct list of distributions from
resolvable_set.packages().

Fixes: pex-tool#366
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguous Resolvable raised on transitive dep
2 participants