Skip to content

rustdoc output directory structure leaks home directory structure #18370

Open
@gmjosack

Description

@gmjosack

Since Rust-CI has been continuously failing I've been looking to move my docs to GitHub Pages. This led me to notice that when rustdoc is called with an absolute path as input (as cargo does) the files in doc/src will show your entire home directory layout.

This is problematic not only because of the leak of someone's home directory layout, but because those links will break if I build from a new directory, a new computer, and a different contributor commits those changes. Also if you have 2+ contributors you're going to have massive churn on a repo checking in those files. Least importantly the URLs are ugly when clicking on a src link. :)

As an example on Rust's own API docs, If you click the [src] link on http://doc.rust-lang.org/std/vec/ you end up at http://doc.rust-lang.org/src/collections/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcollections/vec.rs.html#11-2901

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions