Skip to content

Justification of html_root_url is missing nuance #229

Closed
@jyn514

Description

@jyn514

cc #75, @dtolnay

From rust-cli/env_logger#185:

The scenario where this goes wrong (assuming you're the author of env_logger and not using html_root_url) is:

  1. Another downstream crate uses env_logger as a dependency
  2. downstream re-exports or in some other way links to env_logger
  3. A user or developer of downstream builds documentation locally with cargo doc --no-deps (without --extern-html-root-url, because in practice no one but docs.rs does that).

Then the links to env_logger will be broken. But there's a simple fix and the fix is to remove --no-deps. Is this really so common that it's worth recommending that library authors use html_root_url?

Note that I'm hoping to fix this properly in cargo instead: rust-lang/cargo#8296

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libsRelevant to the libraries subteam, which will review and decide on the PR/issue.amendmentAmendments to existing guidelinesdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions