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

add flag to optionally document dev dependencies #7077

Closed
wants to merge 3 commits into from

Conversation

yaahc
Copy link
Member

@yaahc yaahc commented Jun 28, 2019

This is working. One issue that I noticed right away is that a second run of cargo doc --open without the --dev option after it has already been run once with dev documentation enabled it will still show the documentation items from the last run.

closes #3475

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 28, 2019
@ehuss
Copy link
Contributor

ehuss commented Jun 30, 2019

it will still show the documentation items from the last run.

This is normal. The rustdoc code is written such that it is additive, it doesn't remove previously documented crates (unless you run cargo clean).

I just had a couple observations:

  • Why not also support build-dependencies? Maybe the flag could be changed to accommodate different dependency kinds? I don't want it to be too complicated, but it seems strange to leave that out.
  • Implementation-wise, there are now two places where cargo doc options are handled: CompileMode::Doc{deps} and BuildConfig::document_dev_dependencies. I would like to see that unified into one place. My personal preference would be to remove the deps field from CompileMode::Doc, it is ignored 99% of the time. This could also tie into the first point, where the field in BuildConfig could be a single field that indicates which kinds of dependencies to include.

@ehuss
Copy link
Contributor

ehuss commented Jun 30, 2019

Oh, and this will need a test when it is ready.

tests/testsuite/rustdoc.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Sep 3, 2019

☔ The latest upstream changes (presumably #7216) made this pull request unmergeable. Please resolve the merge conflicts.

@yaahc
Copy link
Member Author

yaahc commented Feb 24, 2020

Gonna close this because I doubt I'll get to it any time soon, but if someone else wants to pick up where I left off they're more than welcome to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally document dev-dependencies
5 participants