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

Machine-readable output #450

Open
fenhl opened this issue May 12, 2016 · 5 comments
Open

Machine-readable output #450

fenhl opened this issue May 12, 2016 · 5 comments
Labels
Milestone

Comments

@fenhl
Copy link

fenhl commented May 12, 2016

I used to have a function in my shell that shows when the current directory is running on a multirust toolchain other than stable. The current formatting is making the port to rustup.rs difficult. An option to generate machine-readable output (preferably JSON) on relevant commands like rustup show and rustup override list would be great.

@brson
Copy link
Contributor

brson commented May 13, 2016

Yes indeed. Sorry for breaking your stuff, but I did make the decision to cater to human-reading first.

Since this is mostly for shell scripts I'd guess it's best to do something simple and line-oriented. The default 'smart' behavior of show where it decides how much to show or not would be bad.

Perhaps a scheme like

  • rustup show active-toolchain --machine-readable
  • rustup show active-toolchain-version --machine-readable
  • rustup toolchain list --machine-readable

@matklad
Copy link
Member

matklad commented Sep 7, 2016

Since this is mostly for shell scripts

It would be useful in IntelliJ Rust as well, though I would also prefer simple text format.

@dherman
Copy link

dherman commented Apr 3, 2017

This looks like it could be useful for Neon too -- +1 to shell script-friendliness. For the time being I may end up parsing the output of rustc --version or rustup toolchain list, but a stable machine-readable output would be awesome!

@alexreg
Copy link

alexreg commented May 4, 2017

Any progress on this?

@QAston
Copy link

QAston commented Feb 19, 2023

Still needed

@rami3l rami3l added this to the On Deck milestone Jun 9, 2024
@rami3l rami3l added the tracking This is a tracking issue label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants