Document build dependencies and dev dependencies#8562
Document build dependencies and dev dependencies#8562tmiasko wants to merge 1 commit intorust-lang:masterfrom tmiasko:doc-deps-kinds
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
--kindsoption 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
--kindsoptions is used, the default behaviour of documentingnormal dependencies is suppressed unless asked for explicitly with
--kinds=normal. The--kindsoption also conflicts with--no-deps.Follow up on proposal from #7077. Resolves #3475.
Open questions:
--kindsdocument normal dependencies by default, obviating the needfor normal kind of dependencies? Current answer is no.
--kindsinteract with--no-depsflag? Current answer is no, butpresence or absence of
--no-depscould control if dependencies of selecteddependencies are also documented.