crates.io: docs.rs link is missing from search results

For crates without a documentation key in their Cargo.toml, crates.io is supposed to generate a Documentation link to docs.rs. However, this Documentation link is sometimes missing on search results.

Steps to reproduce:

  1. Open a fresh browser instance. (For example, I’m using chromium --user-data-dir="$(mktemp -d)" on Arch Linux.)
  2. Navigate to https://crates.io/search?q=ndarray-npy
  3. Observe that there is no Documentation link for the ndarray-npy crate. (It should be there, but it is missing. That’s what this issue is about.)
  4. Click on the ndarray-npy crate link (URL: https://crates.io/crates/ndarray-npy).
  5. Click the “back” button on your browser to navigate back to the previous page.
  6. Observe that the Documentation link has now appeared.

I’m observing this behavior for crates that do not include a documentation key in their Cargo.toml. Currently, examples of this include the ndarray-npy, py_literal, aho-corasick, unreachable, and void crates, among many others.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 4
  • Comments: 21 (17 by maintainers)

Commits related to this issue

Most upvoted comments

So generally the question will be, just for search results, if you rather link to /latest/ on docs.rs, where it might not be the same version as stated in the search results, or you link to the specific latest version on crates.io, which might not be built on docs.rs yet.

I think it should link to the version number that is shown in the search results. Then if that version is still building docs.rs can show a message saying “this is still in the queue” and offer a link to an earlier version that has already been built.