Skip to content

Comments

Avoiding initiating forks when applying constraints to markers#10489

Closed
charliermarsh wants to merge 2 commits intomainfrom
charlie/fork-constraints
Closed

Avoiding initiating forks when applying constraints to markers#10489
charliermarsh wants to merge 2 commits intomainfrom
charlie/fork-constraints

Conversation

@charliermarsh
Copy link
Member

Summary

Closes #10481.

@charliermarsh
Copy link
Member Author

I'm worried that this will regress error messages. I have another idea for how to fix it, if so...

@charliermarsh charliermarsh force-pushed the charlie/fork-constraints branch from b289679 to 9ff5f54 Compare January 11, 2025 01:58
@charliermarsh charliermarsh added the bug Something isn't working label Jan 11, 2025
@charliermarsh
Copy link
Member Author

Yeah this is probably a no-go.

charliermarsh added a commit that referenced this pull request Jan 11, 2025
## Summary

If you have a dependency with a marker, and you add a constraint, it
causes us to _always_ fork, because we represent the constraint as a
second dependency with the marker repeated (and, therefore, we have two
requirements of the same name, both with markers). I don't think we
should fork here -- and in the end it's leading to this undesirable
resolution: #10481.

I tried to change constraints such that we just _reuse_ and augment the
initial requirement, but that has a fairly negative effect on error
messages: #10489. So this fix seems a bit better to me.

Closes #10481.
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.

Huge number of platform markers now in uv pip compile output (0.5.8+)

1 participant