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

[Feature request] Add option to delete older files, while keeping latest building files. #133

Closed
asuper0 opened this issue Oct 8, 2024 · 2 comments

Comments

@asuper0
Copy link

asuper0 commented Oct 8, 2024

I don't know much about the target directory. As far as I can see, the folders ".fingerprint", "build", "deps", "incremental" in "target/debug" and "target/release" have a lot of files/directories that with same prefix name.

For example, some part of the result of command "tree" in a workspace is list below:

D:\CODE\MY-WORKSPACE\TARGET\DEBUG
├─.fingerprint
│  ├─accesskit-00942bf6e64bbd0b
│  ├─accesskit-8639bec9549c765f
│  ├─accesskit-8b8bd7f188609abf
│  ├─accesskit-d80de0308519eae3
│  ├─accesskit-e3275f96d41df320
│  ├─accesskit_consumer-02fc85c8f13e2003
│  ├─accesskit_consumer-59f82437b3acef82
│  ├─accesskit_consumer-a2a9b344432059d1
│  ├─accesskit_consumer-badf8695ab5ac855
│  ├─accesskit_consumer-bd7f6bed27872679
│  ├─accesskit_windows-12c2a8f16bca03f7
│  ├─accesskit_windows-17206f82471351e7
│  ├─accesskit_windows-c467954f85e30ac7
│  ├─accesskit_windows-cad35d792b535d92
│  ├─accesskit_windows-ff60aa76584c6727
│  ├─zune-inflate-771a149f86552d70
│  ├─zune-inflate-914f629f21929627
│  └─zune-inflate-989624ffed4782d7
├─build
│  ├─anyhow-2796afee33af9995
│  ├─anyhow-2f202be394772eb5
│  ├─anyhow-35075f4dd4e0809f
│  ├─anyhow-4c208fab29793feb
│  ├─anyhow-d949b6cbe05936f0
│  ├─winit-4d984045b9849f0c
│  ├─winit-a38472a21e269d8d
│  ├─winit-d56e256dc2bd7220
│  └─winit-f1640ba50df1cc3d
├─incremental
│  ├─video_player-g7sjztnpaqir
│  │  └─s-h06v6005zt-vbs18w-2u99hfh3a3sgabkh1towtvcml
│  ├─video_player-i86vlzggwyzk
│  │  └─s-h0ducxvpwq-ssfwz1-5wxgjorxm4uzeb2z3zbw76qqa
│  ├─video_player-nz4t2rv7j9rh
│  │  └─s-gzk0xzed3j-wh1vnd-3wzueq2amhm21wbo0rt3yaews
│  ├─video_player-pptlvj5okj1j
│  │  └─s-gxzpa60czq-hp5niw-working
│  ├─video_player-qbkfl6utagk0
│  │  └─s-gyia0b5ofv-1sjuzdy-2sq7a5lpk33b6fxlosn65kabl
│  ├─video_player-s2l73fqhh0sa
│  │  └─s-gy9gdpu48p-o70p97-79mstzmbq9zga773k5gce677d
│  └─video_player-zmty9k0wdzwx
│      └─s-gy2yyzhvg5-1dudjjj-7zxxxihp6qltdydzpb77p6sah
└─logs

The crate "accesskit" has file folders in ".fingerprint", with some suffix. We can image that only one of them is useful, and could be digged out by the timestamp. So it would be safe to delete other files to avoid rebuilding the project. I think this is a good way to solve #9 .

@marcospb19
Copy link
Collaborator

There is the '-s' and '-f' flags that should do just this, however, there are some caveats: #9 (comment)

Closing this for now but please reopen if necessary.

@asuper0
Copy link
Author

asuper0 commented Oct 22, 2024

Yes I read that before, and noticed the '-s' and '-f' would delete useful files.

When we change some code and build the project, we can image that the compiler will rebuild the changed part, and link them with other unchaned part. However, the '-s' and '-f' flag would delete the unchanged part, so cargo must rebuild them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants