Skip to content

Make cargo doc --open --target TARGET work as expected.#2988

Merged
bors merged 1 commit into
rust-lang:masterfrom
lifthrasiir:doc-open-with-target
Aug 14, 2016
Merged

Make cargo doc --open --target TARGET work as expected.#2988
bors merged 1 commit into
rust-lang:masterfrom
lifthrasiir:doc-open-with-target

Conversation

@lifthrasiir

Copy link
Copy Markdown
Contributor

Currently cargo doc --open opens $TARGET/doc unconditionally, but it is incorrect if the explicit target is specified.

The target directory should be same to what Layout::new() generates, and ideally it should use the same data source (it hadn't been so far), but I'm yet to find a good way to signal that. At least I'm pretty sure that Compilation is not a good position to put them (it assumes the bipartite "root"-"deps" separation which doesn't quite work in documentation).

@rust-highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ 60afff0

Thanks!

@bors

bors commented Aug 14, 2016

Copy link
Copy Markdown
Contributor

⌛ Testing commit 60afff0 with merge a6e47ca...

bors added a commit that referenced this pull request Aug 14, 2016
Make `cargo doc --open --target TARGET` work as expected.

Currently `cargo doc --open` opens `$TARGET/doc` unconditionally, but it is incorrect if the explicit target is specified.

The target directory should be same to what `Layout::new()` generates, and ideally it should use the same data source (it hadn't been so far), but I'm yet to find a good way to signal that. At least I'm pretty sure that `Compilation` is not a good position to put them (it assumes the bipartite "root"-"deps" separation which doesn't quite work in documentation).
@bors

bors commented Aug 14, 2016

Copy link
Copy Markdown
Contributor

☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64
Approved by: alexcrichton
Pushing a6e47ca to master...

@bors bors merged commit 60afff0 into rust-lang:master Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants