rust-lang / rust-lang/rustdoc-types

`version` and potentially `package_name` in `ExternalCrate`

Open
#57 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
44
Forks
20
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if this is the appropriate place to file a feature request for the json format, since I know this is just a reexport -- please redirect me if there's a better venue. I wasn't sure if an issue on rust-lang/rust was a better choice, or if this needs a full RFC.

In order to traverse between rustdoc-json files, users would need to know the version that the documentation was built against, so that we can ensure that the referenced types are at the listed paths. Additionally, it is convenient to know the potentially-dashed package name up front. Currently, ExternalCrate contains the crate name, but not the package name or version that it was built against. While it's straightforward to parse version and dashed package name out of the html_root_url, this seems unnecessarily brittle. The addition of package_name and version to ExternalCrate would be a significant usability improvement.

I'd happily open a PR to the monorepo with this if it's welcome.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ExternalCrate definition and the rustdoc JSON serialization or schema entry points. Determine how package_name and version should be represented and validated, then confirm the serialized output supports traversing between rustdoc-json files without parsing html_root_url.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.