mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-15 10:12:16 +00:00
Avoid extra-only filtering for constraints (#4095)
## Summary The "only include if relevant for the extra" filtering should _not_ be applied to constraints. Otherwise, we'd only constrain when the extra was included in the constraints file itself, which is incorrect. Closes https://github.com/astral-sh/uv/issues/4091.
This commit is contained in:
parent
39f8978920
commit
8798e91dd5
2 changed files with 39 additions and 3 deletions
|
|
@ -97,6 +97,7 @@ fn add_requirements(
|
|||
// If the requirement isn't relevant for the current platform, skip it.
|
||||
match source_extra {
|
||||
Some(source_extra) => {
|
||||
// Only include requirements that are relevant for the current extra.
|
||||
if requirement.evaluate_markers(env, &[]) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -167,9 +168,6 @@ fn add_requirements(
|
|||
// If the requirement isn't relevant for the current platform, skip it.
|
||||
match source_extra {
|
||||
Some(source_extra) => {
|
||||
if constraint.evaluate_markers(env, &[]) {
|
||||
continue;
|
||||
}
|
||||
if !constraint.evaluate_markers(env, std::slice::from_ref(source_extra)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue