-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
During the first build with a build script (or running cargo doc
) cargo does a full scan of the package to determine the file with the newest mtime. This full scan can be expensive and can cause some issues. For example, in #9545, there is no way to tell cargo to avoid scanning certain paths. This is also a lot of needless work, since for the purpose of determining if something needs to rebuild, during the first build it should know for certain that it needs to be built.
This is difficult to fix because the fingerprinting code is fairly tricky and subtle. One idea I had was to add a new FirstRun
variant to LocalFingerprint
that will be used if this is a build script that has never been run. The LocalFingerprint
should then get adjusted to the correct value here. However, I vaguely recall trying this and running into problems.
- Fixing this for
cargo doc
isn't feasible unlessrustdoc
adds the ability to emit a dep-info file somehow.- Tracked in Tracking Issue for
-Zrustdoc-depinfo
#15370.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Activity
cargo doc
doesn't detect dirty sources from parent directories #12266warning: File system loop found: xxx
printed when runningcargo run
on file not ever needed bycargo
#12600weihanglo commentedon Mar 31, 2025
The
cargo doc
part of this full scan issue is expected to get fixed via #15359. It is now tracked in #15370.