RUST-1268 Correctly report rustc version used for compilation in handshake #622
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RUST-1268
Switches the driver to use
rustc_version_runtime
to retrieve the rustc version used for compilation for inclusion in the driver handshake metadata.Previously, on a machine where rustc was available the platforms field looked like this:
When rustc is not available, this field was null.
Now, it looks like this (slightly different due to the formatting of
VersionMeta.short_version_string
, but the relevant info is still there and in a similar format):It doesn't seem like we test this at all right now, but I did test manually to get the results I pasted above. I don't think a test would have caught the bug this fixes anyway though, since we always have rustc available when we are running tests.
Feel free to check yourselves as well. Note one quirk is that if you switch Rust versions and recompile, it seems
rustc_version_runtime
doesn't get rebuilt, so you have tocargo clean --package rustc_version_runtime
and rebuild to get that updated.