skargo: use per-unit state.db to avoid cache thrashing#1120
skargo: use per-unit state.db to avoid cache thrashing#1120cristianoc wants to merge 1 commit intoSkipLabs:mainfrom
Conversation
Lib and test targets sharing the same build directory and relocation model would read/write the same state.db, causing cache thrashing. Include the package name and unit hash in the state.db filename to make it unique per compilation unit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
My understanding is that the lib and test targets (for the same build profile) should be able to share the same cache, because the cache for the test target should be a superset of the cache for the lib target. Is building |
The observation is that |
|
@cristianoc Do you observe this behavior for all projects or for one in particular? |
|
Might be related: #971. |
Lib and test targets sharing the same build directory and relocation model would read/write the same state.db, causing cache thrashing. Include the package name and unit hash in the state.db filename to make it unique per compilation unit.
Fix #1119