-
-
Notifications
You must be signed in to change notification settings - Fork 423
Delete temporary build directory after compilation #1671
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
Conversation
ubidefeo
commented
Feb 22, 2022
@alranel
If I'm not wrong this directory is the one containing files used for Language Server and Debugger.
@cmaglie and @silvanocerza can you confirm?
I confirm what @ubidefeo is saying. I don't think we should make this change, all in all I think it has been an improvement.
We could offer a way for user to delete all those temporary folders though. There's already a cache clean
command, we could take advantage of it to also delete all arduino-sketch-<md5_hash>
in the temp folder.
PaulStoffregen
commented
Feb 22, 2022
Perhaps the oldest leftover temporary files could be found and deleted? It could be based on the file age, or space used, or both. A few people might not want any files left over, but probably most people just wish to avoid boundless growth over long term use.
ubidefeo
commented
Feb 22, 2022
@silvanocerza @PaulStoffregen
one would assume that an Operating System deleted files in temporary folders every now and then.
I think we could leverage cache clean
to do that
Gotcha. I was under the erroneous assumption that everything we store under /tmp are temporary files but I understand we're also storing cache files there. I believe there are more standard places where to store cache files, such as ~/Library/Caches on macOS and ~/.cache on Linux, and there's also a XDG_CACHE_HOME env variable.
Apart from location, maybe using the prefix arduino-cache-
in combination with the proposed cache clean
command could help.
(Feel free to close this pull request of course)
Perhaps the oldest leftover temporary files could be found and deleted? It could be based on the file age, or space used, or both. A few people might not want any files left over, but probably most people just wish to avoid boundless growth over long term use.
This suggestion has been implemented. I am closing this issue as resolved.
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Bug fix (somewhat).
The temporary build directory created by
arduino-cli compile
is not deleted when the process is done. When running many jobs, the impact on free disk space can be visible.The temporary build directory is deleted when compilation is done.
titled accordingly?
No breaking change.
See how to contribute