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

[src] links in rustdoc do not honor --extern-html-root-url #58472

Closed
QuietMisdreavus opened this issue Feb 14, 2019 · 3 comments
Closed

[src] links in rustdoc do not honor --extern-html-root-url #58472

QuietMisdreavus opened this issue Feb 14, 2019 · 3 comments
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@QuietMisdreavus
Copy link
Member

Originally reported at rust-lang/docs.rs#298

The crate mentioned in that issue has a #![doc(html_root_url)] attribute set, and the [src] link that points to that crate is using that to base its url. However, the --extern-html-root-url that docs.rs passes to rustdoc should be overriding that setting. We should investigate how rustdoc generates [src] links, and see whether it needs to be modified to account for --extern-html-root-url, like how other cross-crate links are made.

@QuietMisdreavus QuietMisdreavus added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 14, 2019
@GuillaumeGomez GuillaumeGomez self-assigned this Feb 16, 2019
@GuillaumeGomez
Copy link
Member

The whole thing happens in here and it seems the --extern-html-root-url option has priority over #![doc(html_root_url)]. Now my guess is: it's not given to sub-crates for some reason. Investigations continue!

@ollie27
Copy link
Member

ollie27 commented Feb 16, 2019

The build log shows rustdoc was passed --extern-html-root-url 'futures_util_preview=https://docs.rs/futures-util-preview/0.3.0-alpha.12' but the crate name is futures_util not futures_util_preview. It looks like docs.rs needs to use the actual crate name not the package name.

@QuietMisdreavus
Copy link
Member Author

@ollie27 That makes sense! I'll reopen the issue on docs.rs and close this one (and @GuillaumeGomez's PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants