Rustdoc JSON 2023 Roadmap (original) (raw)

Foreign ID Lookup

This need's it's own issue at some point, but for the zulip chat is the best resource.

The problem we want to solve is that if I have an Id from one crate's json, but the Id is for a foreign type, then it won't be present in index, only paths. If you want to see the Item, you need to find the json for the crate that this Id is from. The problem is that in this JSON you need to use a different ID. To find the ID in the crate the item is local to, you need to find the path for the item from paths, and then look that up the the json for the crate the item's from.

This is cumbersome, slow, and unreliable 1.

Idealy you should be able to just use the Id from one JSON in another. I'm not sure if this is possible, or if we'll need some translation scheme, potentially spiting Id's into two fields (crate id, and item id). How exactly this will work needs further design work.

Correctness.

Rustdoc JSON should never emit wrong, or invalid data (duh). There is still work to do on this, in particular:

Once these are fixed, we should:

Performance

Rustdoc JSON has had essentially no performance work done to it 2. Theirs probably alot of low hanging fruit.
The first thing to make this feasable is

Once this lands and we can use @ bors try @ rust-timer queue, we can actually make some changes. It's hard to know what actually matters without data, but some ideas to explore:

Internal Improvements

  1. Especialy when the path isn't present in the public docs.
  2. Except for fixing an issue where a syscall was being done for every single key, punctuation and value in JSON.