Skip to content

Comments

Avoid enforcing extra-only constraints#4570

Merged
charliermarsh merged 1 commit intomainfrom
charlie/c
Jun 26, 2024
Merged

Avoid enforcing extra-only constraints#4570
charliermarsh merged 1 commit intomainfrom
charlie/c

Conversation

@charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jun 26, 2024

Summary

In the dependency refactor (#4430), the logic for requirements and constraints was combined. Specifically, we were applying constraints before filtering on markers and extras, and then applying that same filtering to the constraints. As a result, constraints that should only be activated when an extra is enabled were being enabled unconditionally.

Closes #4569.

@charliermarsh charliermarsh added the bug Something isn't working label Jun 26, 2024
@@ -1,3 +0,0 @@
--index-url file:///Users/crmarsh/workspace/packse/index/simple-html/

example-a-961b4c22
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I must've checked this in at some point accidentally.

return false;
}
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is almost the same as above but not quite (the filtering on extras is different), just as it was prior to the refactor (intentionally so).

.into_iter()
.flatten(),
)
})
Copy link
Member Author

Choose a reason for hiding this comment

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

The key is that we shouldn't apply the constraints here; we only apply them after we've filtered requirements.

@charliermarsh charliermarsh requested review from konstin and zanieb June 26, 2024 22:40
@charliermarsh
Copy link
Member Author

charliermarsh commented Jun 26, 2024

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

Thanks for pulling up the additional context for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in uv 0.2.16 compile with unsatisfiable constraint in extra

2 participants