fix(check): Adjust format of 'rustup check' to be like Cargo - #4574
fix(check): Adjust format of 'rustup check' to be like Cargo #4574epage wants to merge 2 commits into
Conversation
|
Overall, I'm mixed on the results and can see this going one in several directions |
Can you elaborate? What do you like/don't like? What potential directions do you see? |
|
|
@djc I do like this style unification with |
I think I'm missing how json output mode is relevant to how things are rendered. |
@epage This is unfortunate, but currently We've changed the output of |
|
At #t-rustup > rustup/cargo output format consistency @ 💬 I had looked at how people might be using the commands programmatically and it seemed like it would be fine to change this command. Has something changed since then?
|
|
@epage I think the analysis is, from t-rustup's POV, mostly accurate, though it turned out that people are already parsing It is true that progress reporting etc. are for communication purposes. However there are still parsable elements in the output, such as:
Although arguably the number of examples might be relatively small. This is true even for Finally, the Personally though, these messages are not very good-looking, so aligning with The thing is, I do want to push that forward, but there seems to be no real way to find out the impact before the stable release happens. Beta releases are, clearly, not enough otherwise it should've worked on v1.28... Do you have any ideas in that regard? |
At least for Cargo, we don't take this level of caution. We have json messages for some parts of compilation, not even enough to recreate Cargo's output. No other end-user operations have json output at this time, whether it be publish operations, |
|
☔ The latest upstream changes (possibly #4745) made this pull request unmergeable. Please resolve the merge conflicts. |
Rust's toolchain installer, shipped as a bundled definition. Toolchains are the packages, not components. A toolchain is the object every verb accepts, so `installed`, `install`, `remove` and `upgrade` all address the same string. Components lose on three counts: they are scoped to a toolchain, they carry no version of their own, and a bare component listing answers for whichever toolchain is currently active, which would make the inventory depend on ambient state rather than on the machine. Installed toolchains therefore carry no version, since a toolchain listing reports none and the only offline source is spawning each toolchain's own compiler. `outdated` supplies both versions where it matters. Every mutating call forces `--no-self-update`, so upgrading a toolchain no longer replaces the `rustup` binary as a side effect. The `outdated` pattern accepts both the `Update available : ` spelling of 1.28 and the `update available: ` of 1.29, and excludes rustup's own self-update line. Its output carries no stability guarantee: the 1.28 reformatting broke downstream parsers, and a further restyling is proposed in [rust-lang/rustup#4574](rust-lang/rustup#4574).
Discussed at #t-rustup > rustup/cargo output format consistency @ 💬