Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
alranel wants to merge 1 commit into arduino:master from alranel:remove-temp-dir

Conversation

Copy link
Contributor

@alranel alranel commented Feb 21, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

Bug fix (somewhat).

  • What is the current behavior?

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.

  • What is the new behavior?

The temporary build directory is deleted when compilation is done.

No breaking change.

  • Other information:

See how to contribute

Copy link

@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?

Copy link
Contributor

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.

ubidefeo reacted with thumbs up emoji

Copy link

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.

Copy link

@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

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Feb 23, 2022
Copy link
Contributor Author

alranel commented Feb 23, 2022

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)

Copy link
Member

cmaglie commented Jul 30, 2024

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.

@cmaglie cmaglie added the conclusion: resolved Issue was resolved label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /