sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

Fix reject of valid state in criteria compatibility check #111

Closed sanderr closed 1 year ago

sanderr commented 1 year ago

Fix incorrect rejection of some states where dependencies for multiple versions of the same package are considered for conflicts. This pull request introduces a check at the end of each round of pinning: any newly invalidated pin (because of a new requirement), is removed as an information provider from the state's criteria.

I believe this implements the same behavior as initially proposed in #91 but more directed, to maintain the overall correctness of each state's criteria and to limit overhead.

I am currently still unsure how I should address this comment (last remaining TODO in the diff) but I thought I'd already open the bulk of my changes for review.

(If accepted, might I ask to add the hacktoberfest-accepted label to the pull request? I mean to follow through on this either way of course.)

closes #91

frostming commented 1 year ago

Hi, I've accepted this PR for hacktoberfest, can you fix the lint issue by formatting the code with black?