Conversation
|
Also need to write comments to describe how things work. |
353f6db to
133db3c
Compare
pradyunsg
left a comment
There was a problem hiding this comment.
Approach looks great to me.
I'm a little concerned about the flexibility we're giving the provider here, but, I guess that's a ship that sailed a while back. 🙃
|
Forgot to mention: Please feel free to suggest alternative method names. I’m terrible at this. |
|
|
||
| Both arguments are iterators yielding requirement objects. A boolean | ||
| should be returned to indicate whether the two sets should be treated | ||
| as matching. |
There was a problem hiding this comment.
This should also mention requirements_a is the new state, and requirements_b is from a known-to-fail state. This is important since the provider can implement range merging to return True when requirements_a is a subset of requirements_b to prune additional subtrees.
(The method name should probably change.)
There was a problem hiding this comment.
OTOH if requirements_a is a superset of requirements_b, this should be used to exclude requirements_b from requirements_a so the resolver can avoid visiting some subtrees. Maybe the interface should be defined to perform specifier merging instead.
This produces a ResolutionImpossible against
pip install prefect[all_extras] --only-binary :all:in ~30s.Still much to work on, mainly error reporting seems wrong. I can’t make sense of the report from the
perfectexample. It contains manyprefect[all-extras]entries (different versions), but does not actually show where the conflict is. But the approach itself seems to work.