Description
Some time ago I wanted to check how much faster my library has got in various Rust versions. So I cloned the repo and checked out an older git commit and used rustup to get an older rustc and tested it both with the older rustc and the newer one... it downloaded various dependencies and tried to build it (with the older rustc) but then it failed because apparently the crates on crates.io
required newer Rust versions than the one I was benchmarking my library with. So I figured out a trick: I've told cargo to not use crates.io as a registry source but my own private clone, and I made that clone point to a commit from back when the compiler got released. This worked really well!
Now to my feature request. I'd like to have this automated, via a flag in cargo
: if you invoke cargo generate-lockfile --registry-time 2017-01-01
, cargo would check out a commit from that day from the registry and use that commit for lockfile generation.
I think it is justified to call this feature "time machine" because it emulates the time from back then.
Everyone who has missed the presence of a Cargo.lock can feel this I think :).
Activity