-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
feat: purge build cache #2033
feat: purge build cache #2033
Conversation
a7060fb
to
2d5c5f0
Compare
Codecov ReportBase: 36.68% // Head: 36.74% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2033 +/- ##
==========================================
+ Coverage 36.68% 36.74% +0.06%
==========================================
Files 228 229 +1
Lines 19385 19456 +71
==========================================
+ Hits 7111 7150 +39
- Misses 11442 11472 +30
- Partials 832 834 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The go-paths
can be exploited much more here, I didn't comment everywhere, but you surely got the pattern :-)
b766637
to
df1ec17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE: resolved by 7082f17
https://github.com/arduino/arduino-cli/blob/feat/purge-build-cache/docs/configuration.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .last-used
file is not being written to the core cache. This causes the core to always be considered older than TTL.
f5a4c7d
to
7082f17
Compare
78ede0d
to
6afc55a
Compare
80edb72
to
5d44cb3
Compare
c006813
to
d7efac1
Compare
d7efac1
to
776d66c
Compare
42e8b03
to
446e2af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very nice system. Thanks Luca!
3293e09
to
5296056
Compare
…li into feat/purge-build-cache
5296056
to
9aa2d1f
Compare
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)What kind of change does this PR introduce?
The build files saved under temporary folders gets cleaned regularly if not used.
What is the current behavior?
Unused files remain stale in temporary folders until the os decides to eventually remove them
What is the new behavior?
After an amount of compilations the built files are deleted if they were last used before a period of time.
The number compilations before the purge is triggered and the maximum age of the files are configurable with the following environment variables:
ARDUINO_BUILD_CACHE_COMPILATIONS_BEFORE_PURGE
(0 signifies never purge, default to 10)ARDUINO_BUILD_CACHE_TTL
(default to 30 days)This does only apply the default, temporary, build path. It does not purge files under user-specified locations, outside of the default one.
The default directory structures is also changed from:
to
Does this PR introduce a breaking change, and is titled accordingly?
Other information
Fixes #2029