Rustdoc JSON 2023 Roadmap #106697
Labels
A-rustdoc-json
Area: Rustdoc JSON backend
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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 inindex
, onlypaths
. If you want to see theItem
, you need to find the json for the crate that thisId
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 frompaths
, 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:
core
#106435Once these are fixed, we should:
jsondoclint
on the output running automaticly.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:String
for eachId
index
, but use one of the good ones without HashDos migrations (probably rustc's fxhash)PathBuf
inSpan
.Internal Improvements
Footnotes
Especialy when the
path
isn't present in the public docs. ↩Except for fixing an issue where a syscall was being done for every single key, punctuation and value in JSON. ↩
The text was updated successfully, but these errors were encountered: