Skip to content
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

Document Cargo metadata hash #1761

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 2, 2023

The collector uses RUSTC_FORCE_RUSTC_VERSION and RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER to try to limit noise introduced by different stable hashes and mangled method names.

@bjorn3 realized that there is another source of this noise. Cargo uses rustc -vV and hashes the output, and then passes this hash to rustc using -Cmetadata. This happens here.

I experimented with the hash, and it looks like it's mostly a non-issue for rustc-perf, because all try and master builds should have the same hash, because Cargo only hashes the part of the rustc version after the dash, which should be nightly for all try and master builds (it also hashes the host, but that is, at least for now, constant on the collector server). The hash will be different for beta/stable benchmarks, but there are so rare that this is probably not a problem in practice.

This PR documents this behavior.

@Kobzol Kobzol merged commit fd0437c into rust-lang:master Dec 4, 2023
10 checks passed
@Kobzol Kobzol deleted the pin-rustc-fake-version branch December 4, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants