Skip to content

Rustdoc JSON 2023 Roadmap #106697

Open
Open
@aDotInTheVoid

Description

@aDotInTheVoid

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:

  • Do a crater run with 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:

Internal Improvements

Footnotes

  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-jsonArea: Rustdoc JSON backendC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions