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

Prefetch downloads same repo multiple times #59

Closed
kristoff3r opened this issue Dec 6, 2019 · 2 comments
Closed

Prefetch downloads same repo multiple times #59

kristoff3r opened this issue Dec 6, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@kristoff3r
Copy link
Contributor

On the latest master, the following happens when running crate2nix generate for https://github.com/Hirevo/alexandrie:

Prefetching    1/1: https://github.com/rustasync/tide
Prefetching    2/1: https://github.com/rustasync/tide
Prefetching    3/1: https://github.com/rustasync/tide
Prefetching    4/1: https://github.com/rustasync/tide
Prefetching    5/1: https://github.com/rustasync/tide
Prefetching    6/1: https://github.com/rustasync/tide
Prefetching    7/1: https://github.com/rustasync/tide
Prefetching    8/1: https://github.com/rustasync/tide
Wrote hashes to ./crate-hashes.json.
Generated ./Cargo.nix successfully.

And it generates the following crate hashes:

{
  "tide 0.2.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-cookies 0.2.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-core 0.2.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-cors 0.2.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-forms 0.1.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-headers 0.1.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-log 0.1.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98",
  "tide-querystring 0.1.0 (git+https://github.com/rustasync/tide?rev=af0b900#af0b900bc447eb4410874752c9a7a35b9be79561)": "1izyw0132p1yzpd3frlqjmn4fy3z4l39x9k6rak5lgf9rj4gix98"
}

The problem is that multiple git packages with the same source doesn't get the same packageid, even though we only want to prefetch once, and you currently use that id to look up the hash.

@kolloch kolloch added the help wanted Extra attention is needed label Dec 11, 2019
@kolloch
Copy link
Collaborator

kolloch commented Jan 26, 2020

I tested it on Hirevo/alexandrie@d27954b and it works now.

@kolloch kolloch closed this as completed Jan 26, 2020
@kolloch
Copy link
Collaborator

kolloch commented Jan 26, 2020

Thank you for your report :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants