-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Is there a way to run cargo doc and only get the documentation for direct dependencies of my project? #6421
Comments
There isn't currently, but a flag could be added! |
Plausible flag names? |
Is there a reason cargo doc builds the documentation for every dependency of the project and not only the direct dependencies? I can't imagine that someone would want the documentation for all dependencies and also what is the point of the flag --all? |
This may be a duplicate of #2025. |
I'd like to help implementing this, but I wonder what is the expected behavior of links which refer to the "undocumented" crates? some options OTOH:
I'm not yet familiar how the I also wonder if it's possible to avoid building the documentation of the indirect dependencies entirely, not just hiding after the fact, since building them is a time-consuming process. |
Closing as a duplicate of #2025. |
Describe the problem you are trying to solve
Whenever I run cargo doc, it builds the documentation for all the dependencies of the project. The problem is that I don't want all the documentation for every crate. I only want the documentation for the crates that are direct dependencies of my project and not the dependencies of my project's dependencies.
Describe the solution you'd like
I would prefer if the default behavior of cargo doc only builds the documentation for my project and its direct dependencies.
The text was updated successfully, but these errors were encountered: