-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustdoc: add support for --emit=dep-info #91982
Copy link
Copy link
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When running rustdoc, cargo currently doesn't know which files are used for each cargo target. Because of this, cargo conservatively assumes that a modification to any file in the project will require rebuilding the documentation for all targets. When running
rustc, cargo uses the dep-info file to know which files each target is built from, so that it can know to only track for changes in those files. It would be helpful if rustdoc had a similar ability so that cargo could more precisely track the files.Since we probably don't want to pollute the output directory with this dep-info file, it would be good to ensure that it supports the
--emit dep-info=PATHsyntax thatrustchas so that cargo could squirrel away the file somewhere else in the target directory.It might be nice if this also included paths passed to CLI options like
--extend-css, though that is a stretch goal.Ideally it would be essentially the same as
rustc, supporting the# env-dep:comments as well to track environment variables that were used.