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

Can't both generate workspace documentation and open it #5145

Closed
loganmzz opened this issue Mar 7, 2018 · 2 comments · Fixed by #6803
Closed

Can't both generate workspace documentation and open it #5145

loganmzz opened this issue Mar 7, 2018 · 2 comments · Fixed by #6803

Comments

@loganmzz
Copy link

loganmzz commented Mar 7, 2018

Description

Running cargo doc --all --open results in error: Passing multiple packages and `open` is not supported

Workaround

cargo clean
cargo doc --all
cargo doc --open # Refresh root crate but leave existing one
@loganmzz loganmzz changed the title Can't both generate workspace documentation and open Can't both generate workspace documentation and open it Mar 7, 2018
@stale
Copy link

stale bot commented Sep 15, 2018

As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it.

I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect?

The team would be especially grateful if such a comment included details such as:

  • Is this still relevant?
  • If so, what is blocking it?
  • Is it known what could be done to help move this forward?

Thank you for contributing!

If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable!

@stale stale bot added the stale label Sep 15, 2018
@dwijnand
Copy link
Member

To me it looks like the workaround no longer works:

$ cargo doc --open
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
error: Passing multiple packages and `open` is not supported.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  adder
  add-one

(using the example workspace from https://doc.rust-lang.org/book/second-edition/ch14-03-cargo-workspaces.html)

@stale stale bot removed the stale label Sep 16, 2018
bors added a commit that referenced this issue Apr 1, 2019
Allow `cargo doc --open` with multiple packages.

If `cargo doc --open` builds multiple packages, open the first one. This seems pretty natural to me (the first one on the command line, or the first default member if `default-members` is specified, or the root of a workspace). Rustdoc shows a list of crates in the sidebar, so if it doesn't open the one the user wants, it's a trivial matter of clicking on the crate name.

@alexcrichton specifically asked for an error [here](#1828 (diff)). However, at the time I don't think rustdoc dynamically generated the "Crates" listing in the sidebar. Alex, I wonder if your stance still holds?

Closes #5145
@bors bors closed this as completed in #6803 Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants