Clear header directory before overwriting it#1211
Clear header directory before overwriting it#1211QuentinLeeWeber wants to merge 1 commit intoKDAB:mainfrom
Conversation
| @@ -46,6 +46,21 @@ fn write_headers_in(subfolder: &str) { | |||
| } | |||
| } | |||
There was a problem hiding this comment.
side point, wonder if sccache uses the hash of the file or the mtime ?
Eg does modifying a file in the header dir (by deleting and writing the same contents again) cause a cache miss ? Or is it comparing the contents anyway.
Looking at the times in CI it seems to help with macOS and Windows Qt 5 specifically 🤔
There was a problem hiding this comment.
Now doing a clean run after rebasing things vs a run on main both with the same cache we seem to have.
| Runner | Before | After |
|---|---|---|
| macOS 13 Qt 5 | 7m 42s | 7m 33s |
| macOS 14 Qt 6 | 6m 15s | 7m 28s |
| Ubuntu Qt 5 | 5m 50s | 5m 43s |
| Ubuntu Qt 6 | 6m 59s | 8m 4s |
| Windows Qt 5 | 10m 16s | 14m 9s |
| Windows Qt 6 MSVC2019 | 12m 19s | 12m 57s |
| Windows Qt 6 MSVC2022 | 13m 1s | 24m 57s |
Seems that this makes Qt 6 1min slower for Linux and macOS, then Windows is curious too. Would probably need more reruns to be sure of the timings.
But it does make me wonder if we should be more intelligent than just delete everything 🤔
There was a problem hiding this comment.
The thing with our CI is that in most cases, this change shouldn't affect it.
Especially on Windows and macOS, we're doing only clean builds, so there is nothing to delete anyway, so this doesn't change anything.
The interesting case is the cargo_rerun test case under Linux, as that would show a difference in caching behavior.
Before writing the new header files, the header directory is now cleared. This change helps to avoid potential conflicts.
b9211d8 to
e832961
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1211 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 73
Lines 12527 12527
=========================================
Hits 12527 12527 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Before writing the new header files, the header directory is now cleared. This change helps to avoid potential conflicts.