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

Preliminary support for sparse indices #870

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MoSal
Copy link

@MoSal MoSal commented Aug 22, 2023

This will forever be a draft, unless someone adopts it of course. But I hope it will help moving things forward.

This implements preliminary support for sparse indices.

  • All deps are updated/upgraded to latest versions.
  • Git index support removed. Only sparse indices work.
  • Tests are broken since they assume git indices.
  • Crate info is not fetched in parallel for the sake of simplicity. Fetching is still very fast despite that (< 4s for cargo-edit, almost instantaneous with --offline).

ureq was already a dependency for some reason. So I used it after enabling the "gzip" feature.

Note to implementers regarding gix-based GitIndex from the latest crates_index:

  • Some tests fail with hash mismatches.
  • A test fails because the order of output is different (I think).
  • Not sure how locking works with gix.

I didn't inspect those issues further, as I just wanted to make sparse indices work for me.

Related issues: #841, #865, #868, possibly #869

 All tests pass.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
 All tests pass.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
 All tests pass.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
@MoSal MoSal marked this pull request as draft August 22, 2023 19:16
@naturecodevoid
Copy link

naturecodevoid commented Aug 23, 2023

git index support should probably be supported by reading the cargo config value, but it seems like a pain to find the config path so I can understand why you wouldn't want to add it, lol

@MoSal MoSal force-pushed the update_crates_index_and_support_sparse_indices branch from a382062 to c016ebf Compare August 23, 2023 09:55
 * Git index support removed. Only sparse indices work.
 * Tests are broken since they assume git indices.
 * Crate info is not fetched in parallel for the sake of simplicity.
   Fetching is still very fast despite that.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
@MoSal MoSal force-pushed the update_crates_index_and_support_sparse_indices branch from c016ebf to f0da565 Compare August 23, 2023 11:39
@epage
Copy link
Collaborator

epage commented Aug 23, 2023

Something to keep in mind is that the FCP is about to close on merging parts of cargo-upgrade into cargo-update after which I'll get to work on doing that and it will be available in a nightly.

@MoSal
Copy link
Author

MoSal commented Aug 23, 2023

@epage

Sounds good.

@tgross35
Copy link

tgross35 commented Nov 14, 2023

@epage do you have a link to the proposal you mentioned? Wondering what the exact change is but can't find anything.

@epage
Copy link
Collaborator

epage commented Nov 14, 2023

rust-lang/cargo#12425

I have a got a lot of the peripheral aspects done but haven't gotten to the core of it yet

@dvc94ch
Copy link

dvc94ch commented Mar 18, 2024

does this mean that cargo upgrade is broken for everyone that installed cargo/rust after the new registry format was added? how can I use the old registry format?

@dvc94ch
Copy link

dvc94ch commented Mar 18, 2024

what's the alternative right now? installing vscode and the rustrover plugin to update incompatible dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants