-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
generate-lockfiles without updating registry #3479
Comments
This may actually be relatively easy to do with Cargo's API-as-a-crate rather than Cargo itself on the command line. I wonder if that'd suffice here? It'd certainly be even faster than spawning 9000 cargos |
Thanks for the advice. I'll look into the api. |
Here's another request for the feature https://users.rust-lang.org/t/generating-lockfile-without-network-access/9007 |
Related to #1882 - if you can generate a lockfile offline, that's ~equivalent to ignoring registry lookup failures. |
Because of #4066 to run this in a subprocess, so we can time things out. |
What would be involved in doing this? With some good guidance I myte eavan give this a try. |
I am a little confused, #4686 is open, but #4770 is merged. Trying to kick the tyres. >cargo -V
cargo 0.25.0-nightly (a88fbace4 2017-12-29)
>cargo generate-lockfile --manifest-path Cargo.toml
Updating git repository `https://github.com/Eh2406/average`
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating git repository `https://github.com/Eh2406/preferences-rs`
>cargo generate-lockfile --manifest-path Cargo.toml -Z offline
error: unknown `-Z` flag specified: offline How is this supposed to be used? |
Ah that's actually because cargo in rust-lang/rust hasn't been updated yet, although hopefully that should happen soon! |
Yes that apres to work now! I think this can be closed! |
Well actually, when I went to use this for crater @aidanhs found a problem. So |
add a -Z no-index-update for crater and benchmarking This is a fix for #3479
|
Cargobomb has a step where it calls
generate-lockfiles
9000 times. Each one of these hits the network to update the registry, which causes a whole lot of latency. I'd like to be able to tell thegenerate-lockfiles
command not to update the registry. Accordingly, I also would need some way to update the registry immediately beforegenerate-lockfiles
.The text was updated successfully, but these errors were encountered: