-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve performance and accuracy by baking in targets
structure knowledge?
#6
Comments
This would be a nice change, but it would perhaps also involve some restructuring since we would have to defer the actual deletion until we are certain that all files are old enough and then delete the entire directory. I also do get the issue of being sensitive to changes of how cargo/rustc stores the files in the target directory, although I would guess that it is pretty stable by this point. |
It is pretty stable, in that It has not changed in a very long time. It is an implementation detail, in that the Cargo team would be comfortable changing it. There has been some buzz about adding a folder to make it clear what is from crates.io (and unlikely to change) vs other sources (more likely to change), or a folder for each compiler version. If there are changes to the structure that would make it easier for |
While investigating #2 (comment), I learned some things about how the folder is structured. As I understand it, the folders come in sets. For example, if there is a folder Meanwhile, the fingerprint already includes the version of rust needed for the files, sow next time I have a sec I will work on a version that lets you |
Hmm, looks interesting. However, are we sure that If you have time on work on that feature that cleans the cache folder on CI on nightly updates I would really appreciate it! |
I have a branch that builds on #14 to remove sets of files based on the fingerprints atime. I have been testing it with cargo +nightly build // to make sure deps are around
cargo +stable build // to make sure deps are around
cargo sweep -s
cargo +stable build // make sure no deps are rebuilt
cargo sweep -f
cargo +stable build // make sure no deps are rebuilt
cargo +nightly build // make sure deps are rebuilt, I.E. we cleaned something above. and so far it has worked on everything I have tried. (well I am on a system that does not support atime. so I had to use a local copy of Cargo with rust-lang/cargo#6477, but that just touches a file instead of reading it.) |
Move to close? |
👍 |
targets
has a basic structure. Once you have the directory for a target, a lot of dependencies are kept in hashed folders. I suspect those hashes include the version and feature flags.The problem is this becomes more brittle because it becomes dependent on how cargo works.
The text was updated successfully, but these errors were encountered: