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

Avoid enforcing extra-only constraints #4570

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Avoid enforcing extra-only constraints #4570

merged 1 commit into from
Jun 26, 2024

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
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!

@charliermarsh charliermarsh enabled auto-merge (squash) June 26, 2024 22:50
@charliermarsh charliermarsh merged commit bbbe1f3 into main Jun 26, 2024
47 checks passed
@charliermarsh charliermarsh deleted the charlie/c branch June 26, 2024 22:52
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