The commit hashes for the nightlies should be recorded somewhere


#1

I have recently discovered that there’s no simple way to map a date to git commit id from which the nightly from that day was build. That information is really helpful for people which build custom versions of Rust and want to have a version that perfectly matches the version of official nightly from a particular date.

From what I learned from asking on IRC, current solution is to download the blob for a particular date (eg. with help from rustup.sh) and run rustc --version. Or do a grepping on a binary. Either way requires downloading about 100MB just to obtain few bytes. And in some cases (building on not officially supported OS or architecture), running rustc --version doesn’t even work.

So, I’d be really happy, if there were one simple file there in each of those directories, containing a git commit hash. What do you think about it?

And I’d be even happier if I’m not right and if the information I want is recorded somewhere and easily obtainable!


#2

Technically you can find this information on buildbot but that’s not much better.


#3

Actually, if you just want the stamp of the latest build, you can query http://buildbot.rust-lang.org/json/builders/nightly-dist-rustc-${platform}/builds/-1/source_stamp and read the revision field.


#4

Thanks for the suggestion! I’ve made a little tool to obtain the hash using this API (performs a binary search to find a given date). But I’m still not sure how exactly build times are related to date of the nightly (Should I consider start or end time? Are they in UTC? What about failed or repeated builds?). This cross-platform script is what I’ve used before, and while it’s slower (downloads whole binary blob), I think it’s more reliable.

Anyway, while these solutions kind of work, they aren’t the prettiest and I still think the information about commit used to build a particular nightly should be easily available somewhere (eg. as a file in each nightly’s directory).


#5

I agree this is needed. Last time I thought about it I wanted to include it as part of the release channel metadata, which in the current revision is the channel-rust-nightly file. Crater also needs this type of information, and I’ll (soon, soon… ) start having it mapping the archives, including untarring the builds to pluck out metadata, and the version (which contains the commit), will be one of them. That will ultimately be available via API.

cc @edunham