Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify default behavior of documentation field #13660

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RalfJung
Copy link
Member

@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2024
@epage
Copy link
Contributor

epage commented Mar 27, 2024

For myself, I feel like its a bug in the system that we have to add so much nuance here. If that bug isn't being fixed, should we just not reference this and encourage people to set the links?

@ehuss
Copy link
Contributor

ehuss commented Mar 27, 2024

Yea, I would agree this seems like weird bug to document. I'm also a little confused, as it seems like the accepted solution should be relatively trivial (something like documentation.or_else(|| format!("https://docs.rs/{name}/latest/{name}")) in the search code).

@RalfJung
Copy link
Member Author

See rust-lang/crates.io#1484, apparently what the crate page does is a lot more complicated than documentation.or_else and involves querying the docs.rs API to check if the crate is actually documented there.

@ehuss
Copy link
Contributor

ehuss commented Mar 27, 2024

My comment was based on rust-lang/crates.io#1484 (comment), which says that the search results should not do that query, and instead just always link to the latest version if the documentation field is not specified. That might cause an issue when the docs are not yet ready, or failed to build, but would be no different than if the user specified the documentation field manually.

@RalfJung
Copy link
Member Author

Yeah, agreed.

@weihanglo
Copy link
Member

If we agree on seeing a fix on crates.io or other services, should this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants