-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Document build dependencies and dev dependencies #8562
Conversation
r? @ehuss (rust_highfive has picked a reviewer for you, use r? to override) |
Hi! Thanks for the PR!
I think the default of "no" here makes sense to me.
Hm, I would be inclined to just print an error if both flags are specified. They are somewhat contradictory. It's probably not too important either way. A few questions and observations:
|
When I was referring to the transitive dependencies I was mostly thinking about I like idea of all-deps, no-deps, direct-deps from #8296. If it were to become I added I also noticed that this sometimes introduces an output filename collision for EDIT: The current implementation modifies the compile mode to distinguish |
I kinda like the original flag name of As for the question of how to indicate whether or not you want transitive deps, I don't have any specific ideas. I'd be fine for deferring that decision to later. It could be something like
Do you have a specific example where this happens? Just keep in mind that this is already a problem, so I'm not sure if you're seeing something new. #6313 has some links for rustdoc issues (like any time there is more than one version). |
Add a new `--deps` option to cargo doc, which allows to select what kinds of dependencies should be documented: build dependencies, dev dependencies, or normal dependencies. Multiple kinds of dependencies can be specified, e.g., `cargo doc --deps=dev,normal`. When `--deps` options is used, the default behaviour of documenting normal dependencies is suppressed unless asked for explicitly with `--deps=normal`. The `--deps` option also conflicts with `--no-deps`.
After looking at this a bit more, it seems to me it will require completely different approach and more substantial changes. Thanks for reviewing this so far. I will close this for now. |
Add a new
--kinds
option to cargo doc, which allows to select whatkinds of dependencies should be documented: build dependencies, dev
dependencies, or normal dependencies. Multiple kinds of dependencies
can be specified, e.g.,
cargo doc --kinds=dev,normal
.When
--kinds
options is used, the default behaviour of documentingnormal dependencies is suppressed unless asked for explicitly with
--kinds=normal
. The--kinds
option also conflicts with--no-deps
.Follow up on proposal from #7077. Resolves #3475.
Open questions:
--kinds
document normal dependencies by default, obviating the needfor normal kind of dependencies? Current answer is no.
--kinds
interact with--no-deps
flag? Current answer is no, butpresence or absence of
--no-deps
could control if dependencies of selecteddependencies are also documented.