-
Notifications
You must be signed in to change notification settings - Fork 958
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
Visit proxy packages eagerly #10441
Visit proxy packages eagerly #10441
Conversation
@@ -80,6 +82,7 @@ impl PubGrubPriorities { | |||
let priority = if urls.get(name).is_some() { | |||
PubGrubPriority::DirectUrl(Reverse(next)) | |||
} else if version.as_singleton().is_some() { | |||
// TODO(charlie): Take local version ranges into account (e.g., `[2.0, 2.0+[max])`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this separately, but this fix alone does not resolve the bug in the linked issue.
The error message changes seem... ok. The transformers ecosystem change is surprising. |
6c67390
to
da1359e
Compare
Ok, think I fixed that regression. |
da1359e
to
5ee783b
Compare
I have a hunch that this will actually improve performance and lead to better resolutions. |
@@ -224,6 +227,9 @@ pub(crate) enum PubGrubPriority { | |||
/// [`ForkUrls`]. | |||
DirectUrl(Reverse<usize>), | |||
|
|||
/// The package is a proxy package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you expand this by saying something like:
We process these first since each proxy package expands into two regular
PubGrubPackage
packages, which give us additional constraints, while not changing the priorities since the materialized packages are of the same package name.
It took me a while to get why this was safe to do.
5ee783b
to
a8b066a
Compare
Summary
The issue here is that we add
urllib3{python_full_version >= '3.8'}
as a dependency, thenrequests{python_full_version >= '3.8'}
, which addsurllib3
, but at that point, we haven't expandedurllib3{python_full_version >= '3.8'}
, so we "lose" the singleton constraint. The solution is to ensure that we visit proxies eagerly, so that we accumulate constraints as early as possible.Closes #10425 (comment).