Uh oh!
There was an error while loading. Please reload this page.
x.py: allow a custom string appended to the version - #79115
Conversation
This adds `rust.description` to the config as a descriptive string to be appended to `rustc --version` output, which is also used in places like debuginfo `DW_AT_producer`. This may be useful for supplementary build information, like distro-specific package versions. For example, in Fedora 33, `gcc --version` outputs: gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) With this change, we can add similar vendor info to `rustc --version`.
rust-highfive
commented
Nov 16, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
Nov 19, 2020
I would like to briefly run this by @rust-lang/release in case there's any concerns, but otherwise this seems good to me from an implementation perspective. |
tmandry
commented
Nov 19, 2020
I support this! It will be really useful for toolchain vendors to identify if an issue is coming from their build and whether a binary/bugreport is coming from their toolchain or not. |
emilyalbini
commented
Nov 19, 2020
While I'd love to see something like this added to the compiler, there are two questions I have:
|
cuviper
commented
Nov 19, 2020
There's already a difference in whether git info is present, e.g. rustup's Tools that parse should use
IMO we should let it be freeform, and don't offer any expectation of parsing meaning from this. If we wanted to add verbose fields for structured vendor specifics, that's possible, but ISTR it has been a problem for version-parsing crates to change/add fields. |
Mark-Simulacrum
commented
Nov 20, 2020
@bors r+ I figure we can iterate if needed. |
bors
commented
Nov 20, 2020
📌 Commit 5f08568 has been approved by |
…mulacrum x.py: allow a custom string appended to the version This adds `rust.description` to the config as a descriptive string to be appended to `rustc --version` output, which is also used in places like debuginfo `DW_AT_producer`. This may be useful for supplementary build information, like distro-specific package versions. For example, in Fedora 33, `gcc --version` outputs: gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) With this change, we can add similar vendor info to `rustc --version`.
bors
commented
Nov 21, 2020
⌛ Testing commit 5f08568 with merge b5d6b6e202853e4b132cb605bafae8fede3dc911... |
bors
commented
Nov 21, 2020
💔 Test failed - checks-actions |
emilyalbini
commented
Nov 21, 2020
@bors retry |
bors
commented
Nov 21, 2020
bors
commented
Nov 21, 2020
☀️ Test successful - checks-actions |
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc was built out of tree, like distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in that version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. This still works all the way back to Rust 1.0.0.
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc was built out of tree, like distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in that version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. This still works all the way back to Rust 1.0.0.
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc was built out of tree, like distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in that version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. This still works all the way back to Rust 1.0.0.
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc was built out of tree, like distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in that version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. This still works all the way back to Rust 1.0.0.
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc is built out of tree, such as in distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in a version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. MSRV remains 1.0.0.
This adds
rust.descriptionto the config as a descriptive string to beappended to
rustc --versionoutput, which is also used in places likedebuginfo
DW_AT_producer. This may be useful for supplementary buildinformation, like distro-specific package versions.
For example, in Fedora 33,
gcc --versionoutputs:With this change, we can add similar vendor info to
rustc --version.