rust-lang / rust-lang/docs.rs

Inconsistent redirect behaviors for platform-specific items

Open
#3,329 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-needs-design
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

Hello! I found some cases, related to platform-specific items, where docs.rs doesn't reliably redirect to the search page when the requested item doesn't exist.

(I imagine most of these only really happen if someone's writing URLs by hand. I found them while experimenting with programmatically generating links to docs.rs for my project)


On this topic I also have a question/proposal: Would it make sense or be feasible, when the URL doesn't specify a target, to try locating the item in all targets, and redirect to the first target if the item was found?

Still using nix as an example: nix@0.31.2 has x86_64-unknown-linux-gnu as the default target, which doesn't have the item nix/sys/termios/fn.cfmakesane.html, but the target x86_64-unknown-freebsd does:

So instead of interpreting a URL without a target as "the default target," perhaps interpret it as "target unspecified"?

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 reproducing the listed docs.rs URLs and trace the existing target-redirect and missing-item handling. Compare behavior for default, explicit, nonexistent, and unspecified targets; the work is done when the intended redirect or search-page behavior is consistent and covered by the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.