-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
@@ -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 { |
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.
Why None
for the extras field?
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.
"No URL, no extra"
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.
Oh sorry
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.
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.
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.
okee
Confirming in #2942 |
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.