I want to create a Cargo.lock file in a Rust project from Cargo.toml based on what was available on 22 Feb 2017. I need to make version selection compatible to what would happen on that specific day. (No, don't have a version controlled Cargo.lock around somewhere.)
I tried this to no avail:
- Clone the crates.io index into a local directory and check out an older commit that matches the desired date.
Use the following lines in .cargo/config:
[source.mycrates] registry = "file:///path/to/crates.io-index" # contains old checkout [source.crates-io] replace-with = "mycrates"
Nevertheless, cargo resolves dependencies in Cargo.toml to the newest ones available, not to the newest ones in the specified checkout.
How could I warp Cargo's version selection back in time?