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

cargo doc --examples ... aborts if there are no examples #14776

Open
profwpollock opened this issue Nov 3, 2024 · 0 comments
Open

cargo doc --examples ... aborts if there are no examples #14776

profwpollock opened this issue Nov 3, 2024 · 0 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-doc S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@profwpollock
Copy link

Problem

I use an alias for this command:
cargo doc -v --open --workspace --document-private-items --all-features --no-deps --examples
When first developing a new project, there are no examples yet. The output is:

"
warning: target filter examples specified, but no targets matched; this is a no-op
Finished dev profile [unoptimized + debuginfo] target(s) in 0.01s
error: no crates with documentation
"

So it is NOT a "no-op". I believe it should be. The warning alone is fine.

Proposed Solution

Instead of failing to provide crate documentation, it should create crate documentation even if there's no examples yet.

Notes

No response

@profwpollock profwpollock added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Nov 3, 2024
@epage epage added Command-doc S-needs-team-input Status: Needs input from team on whether/how to proceed. and removed S-triage Status: This issue is waiting on initial triage. labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-doc S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants