panamax icon indicating copy to clipboard operation
panamax copied to clipboard

Adding --no_update_index option for syncing crates files

Open athola opened this issue 2 years ago • 2 comments

  • Adding --no_update_index option for syncing crates files without updating index
  • Updating src/main.rs to include new option for Sync, --no_update_index, which is a bool
  • Updating src/mirror.rs to include capability to pass down no_update_index bool to sync_crates() method
  • Performing a check in sync_crates(), if !no_update_index, then do the syncing of the crates repom and update the crates config

athola avatar May 12 '22 21:05 athola

related to this issue https://github.com/panamax-rs/panamax/issues/64

athola avatar May 12 '22 21:05 athola

Hi there !

I am not sure about how this fix #64, because the issue is regarding a incoherent state between the local index and the local mirror (the actual crates.io mirror). To be more precise, the index states that crate foo in version 1.0.0 exist in the mirror, but the crate is not present on the filesystem, and when you try to get it you get a HTTP 404 error.

From what I understood of the PR, correct me if I'm wrong, is that it let the user to specify whether to fetch or not the upstream index before syncing. Which means that the diff will be empty and missing indexed crates will not be downloaded. Again, I might misunderstand the PR.

Did you observe that deleting crates from the mirror and then syncing with the option actually downloaded previously deleted crates ?

ricked-twice avatar May 17 '22 12:05 ricked-twice

I'm going to close this PR because I believe #64 has been solved. If you still would like this feature, let me know! There are some conflicts that would need to be fixed, however.

k3d3 avatar Feb 04 '23 02:02 k3d3