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

Add html_root_url to documentation. #339

Closed
wyattjsmith1 opened this issue May 4, 2020 · 3 comments
Closed

Add html_root_url to documentation. #339

wyattjsmith1 opened this issue May 4, 2020 · 3 comments

Comments

@wyattjsmith1
Copy link

When generating docs with cargo doc, it is often preferred to link external dependencies to existing hosted documentation (docs.rs) instead of regenerating the docs. Currently, running cargo doc leaves users with the option of either generating all documentation for gdnative (which is around 200M), or not including links to gdnative. Neither of these options is particularly desirable as one duplicates documentation and the other doesn't include document links.

Ideally, when users run cargo doc, they should only generate their own documentation, and have http links to external documentation on docs.rs (or wherever documentation is located).

Adding html_root_url to the project would allow users of this library to directly link to docs.rs: https://doc.rust-lang.org/rustdoc/the-doc-attribute.html?highlight=link#html_root_url.

Note: There is an open ticket to default to checking docs.rs, but that is old and doesn't seem to be actively developed: rust-lang/rust#42301

@ghost
Copy link

ghost commented May 5, 2020

Thanks for the suggestion! Honestly, I'm not sure how "often preferred" and "ideal" that is. I myself, for instance, have always preferred all my documentation local, simply because it's faster that way, and 200M isn't really that large for a modern computer. Truth to be told, I never for once cared how large the documentation was.

As a result, I'm hesitant to support this proposal since it has the potential to be controversial. I would prefer to let this gather more opinions before doing anything. Are there any "big" libraries that have this behavior by default?

@ghost ghost added the documentation label May 5, 2020
@wyattjsmith1
Copy link
Author

wyattjsmith1 commented May 5, 2020 via email

@ghost
Copy link

ghost commented May 5, 2020

That's certainly a rare use case, then. You may make a local change on your own copy if you want to, but I'm afraid I can't see this getting into upstream, unless it's shown to be a more common practice among well-known crates, or if more users show their interest in it.

I'm keeping this open for now, but feel free to close the issue if you no longer need it in upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant