panamax
panamax copied to clipboard
Adding --no_update_index option for syncing crates files
- 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
related to this issue https://github.com/panamax-rs/panamax/issues/64
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 ?
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.