[xtask] Add support for xtask doc commands#2479
Conversation
|
Ah, I did just notice one limitation of my approach: Like For example, this does work: cargo xtask doc app/cosmo/rev-b.toml packrat -- --openBut this does not work: cargo xtask doc app/cosmo/rev-b.toml ereports -- --openedit: This does work, but requires some knowledge of which crate is used in which app+task: cargo xtask doc app/grapefruit/rev-b.toml ereportulator -- -p ereports --open |
|
(I haven't read the implementation yet, but here's some thoughts on CLI stuff) On one hand, it only makes sense to document packages in the context of a specific On the other hand, it would be nice if this Just Worked™ in a sensible way. We do something similar in I can think of a few ways to organize this at the CLI level:
I lean slightly towards the former, because it matches our existing CLI (e.g. |
This PR factors out a
passthroughhelper, and uses it fordocandclippyinvocations.Closes #2422
This somewhat punts on the flexibility items that @hawkw raised in #2422, as supporting both "before the
--" and "after the--" args, in addition to the variable-length task list, was trickier than I wanted to get involved with inclap. That being said: it's not a feature anyone has needed yet, so I feel comfortable leaving that part as a todo.