Xcode Build System: Module Cache Persistence After Clean Build Folder
0 reputation · 15 Jul 2024, 00:21 UTC
Maintaining a clean environment is essential for ensuring build reproducibility, particularly when integrating Xcode with CI/CD pipelines on resource-constrained agents. The standard mechanism for resetting the build state is the "Clean Build Folder" operation.
While this operation typically removes intermediate artifacts from the Derived Data directory, there is uncertainty regarding the comprehensive removal of cached modules. In certain configurations, stale artifacts may persist within the module cache even after a full clean, potentially leading to inconsistent build results across different Xcode versions.
What is the documented behavior for the module cache during a "Clean Build Folder" action? Does this operation guarantee the removal of all cached modules, or is a manual deletion of the Derived Data directory required to ensure a completely fresh state?