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 version of "Last available"? #5

Closed
RalfJung opened this issue Jun 4, 2019 · 8 comments
Closed

Machine-readable version of "Last available"? #5

RalfJung opened this issue Jun 4, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@RalfJung
Copy link
Member

RalfJung commented Jun 4, 2019

For use-cases like running nightly Clippy or Miri on CI, it would be very useful to be able to determine the last version of rustc that had that component included. This site has all the necessary information for that, but it is not available in a machine-readable way. Do you think that would be a reasonable extension?

I could imagine either a JSON file (so a script could use jq), or maybe just one file per component containing the latest date (so plain curl is enough -- jq IIRC is not available on macOS with Travis).

@mexus mexus self-assigned this Jun 7, 2019
@mexus mexus added the enhancement New feature or request label Jun 7, 2019
@mexus
Copy link
Contributor

mexus commented Jun 7, 2019

Yeah it's quite a nice idea, and I'd say we can actually have both a single json that contains all the info and a set of files with dates.
Let's see what I can do about it :)

@mexus
Copy link
Contributor

mexus commented Jun 7, 2019

So what I came up with so far is generating a file tree like the following
image
... with all the files containing the latest available date (like 2019-12-20), and "no file" means "no info" for the meantime (the "meantime" is currently 29 days back in time).

So the data will be fetchable via a link like http://rust-lang.github.io/rustup-components-history/last-available/x86_64-unknown-linux-gnu/rust-analysis. @RalfJung did I miss anything?

@RalfJung
Copy link
Member Author

RalfJung commented Jun 8, 2019

That sounds pretty awesome! So I can just do nightly-$(curl http://rust-lang.github.io/rustup-components-history/last-available/x86_64-unknown-linux-gnu/miri) to figure out the last nightly with miri?

@mexus
Copy link
Contributor

mexus commented Jun 8, 2019 via email

@RalfJung
Copy link
Member Author

RalfJung commented Jun 8, 2019

Well this is already enough for my usecase, but there are probably others. :)

@mexus
Copy link
Contributor

mexus commented Jun 9, 2019

$ echo nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
nightly-2019-06-08

🎉

@mexus
Copy link
Contributor

mexus commented Jun 9, 2019

I think I'll put on ice making a combined json file and close the issue for now :)

@mexus mexus closed this as completed Jun 9, 2019
@RalfJung
Copy link
Member Author

RalfJung commented Jun 9, 2019

Awesome, thank you so much. :)

I'll play around with this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants