rust-lang / rustdoc-types

Rustdoc's JSON output interface
Apache License 2.0
28 stars 15 forks source link

Crazy idea: change rustdoc-types versions to match rust compiler #34

Open cameronelliott opened 2 months ago

cameronelliott commented 2 months ago

First, thanks for making this!!! It's great.

This might be a bad idea, but I am throwing it out anyway.

I recently had to dig in and understand a little about mapping rustdoc-types version to rustc version numbers, as my deserialization was failing.

I wonder if having the rustdoc-types version numbers be equal to the lowest version of the rust-compiler they work on would be useful. Maybe a table (maybe it already exists?) would be a better approach. Actually a table in the readme or an <h1> link to a table in the readme for compatibility would be super useful!

Thanks

aDotInTheVoid commented 2 months ago

I wonder if having the rustdoc-types version numbers be equal to the lowest version of the rust-compiler they work on would be useful.

How would this work, given that rustdoc-json is only on nightly, so our versions look like 2024-01-18? Translating this into a semver version gets really ugly.

Maybe a table (maybe it already exists?) would be a better approach.

https://github.com/cargo-public-api/cargo-public-api?tab=readme-ov-file#compatibility-matrix is the closest to this I know of.

Actually a table in the readme or an <h1> link to a table in the readme for compatibility would be super useful!

I think the changelog would be the best place for this. Finding the data retroactively would be involved, but doable if someone wanted to. The release/changelog generator scripts would also need to be updated to do this automatically.

I’d be happy to add this, but probably won’t be working on it myself for a long time.