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

Ignore direct URL distributions in prefetcher #2943

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Apr 9, 2024

Summary

The prefetcher tallies the number of times we tried a given package, and then once we hit a threshold, grabs the version map, assuming it's already been fetched. For direct URL distributions, though, we don't have a version map! And there's no need to prefetch.

Closes #2941.

@charliermarsh charliermarsh marked this pull request as ready for review April 9, 2024 18:58
@charliermarsh charliermarsh added the bug Something isn't working label Apr 9, 2024
@charliermarsh charliermarsh requested review from zanieb and konstin April 9, 2024 18:58
@@ -52,7 +52,7 @@ impl BatchPrefetcher {
index: &InMemoryIndex,
selector: &CandidateSelector,
) -> anyhow::Result<(), ResolveError> {
let PubGrubPackage::Package(package_name, _, _) = &next else {
let PubGrubPackage::Package(package_name, None, None) = &next else {
Copy link
Member

Choose a reason for hiding this comment

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

Why None for the extras field?

Copy link
Member Author

Choose a reason for hiding this comment

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

"No URL, no extra"

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh sorry

Copy link
Member Author

Choose a reason for hiding this comment

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

If we include an extra, we'll also include the non-extra variant in the tree. So it seems fine to confine this to those non-extra variants, rather than duplicating the prefetch.

Copy link
Member

Choose a reason for hiding this comment

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

okee

@zanieb zanieb merged commit f9c0632 into main Apr 9, 2024
35 checks passed
@zanieb zanieb deleted the charlie/prefetch branch April 9, 2024 19:09
@zanieb
Copy link
Member

zanieb commented Apr 9, 2024

Confirming in #2942

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.

potential breaking change / bug in uv==0.1.30
2 participants