Repository navigation
Drop every module cache before saving the CI cache - #393
Merged
Merged
Conversation
The macOS 26 job fails with a stale module cache after a runner image update: the cached .pcm was built by Xcode 26.0 and the image now has 26.0.1. The Helper target keeps its own module cache under DerivedData/.../HelperDerivedData/ModuleCache.noindex, which the old cleanup (DerivedData/ModuleCache.noindex only) left in the archive. Remove every ModuleCache.noindex under DerivedData.
oliverames
pushed a commit
to oliverames/iMCP
that referenced
this pull request
Nov 20, 2026
This was referenced Nov 20, 2026
Merged
Xcode 26.0 and 26.0.1 share build 17A400, so the archives saved with the Helper's module cache inside still match the old key.
Contributor
Author
|
@mattt I found a second half to this. Xcode 26.0 and 26.0.1 share build 17A400, so the cache key didn't change when the runner image moved, and the archive that already has the Helper's module cache inside it keeps matching and getting restored. GitHub won't overwrite a cache under the same key, so the cleanup alone wouldn't have helped until those entries aged out. I added a |
Owner
|
Thanks, @oliverames. Merged! A push to each of your other PRs will start a fresh CI run with the new cache key. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @mattt. This follows the macOS 26 job failures on #390 (and the other recent PRs). The failure is not a test: the macOS 26 job fails in different steps on different runs (Test once, Build on the latest run) with a stale module cache.
There are two parts to it. First, the cleanup step removes only
DerivedData/ModuleCache.noindex, but theiMCP Helpertarget keeps a second module cache atDerivedData/<project>/Build/Intermediates.noindex/iMCP.build/HelperDerivedData/ModuleCache.noindex, and that is what ends up in the saved archive. Second, Xcode 26.0 and 26.0.1 share build 17A400, so the cache key didn't change when the image moved to 26.0.1. The archive saved with the Helper's module cache inside still matches the key, gets restored, and the build fails before any test runs.This PR removes every
ModuleCache.noindexunderDerivedDatabefore the cache is saved, and adds av2to the cache key so the bad 17A400 archives already saved onmainstop being restored. GitHub caches can't be overwritten under the same key, so without the version bump they'd keep coming back until they're evicted.I could not verify this in CI from my fork (the workflow runs on PRs to
main, and my branch is fromupstream/main), but the path in the error and the cleanup step line up exactly, and this PR's own macOS 26 job passes. Deleting the 17A400 entries from the Actions cache would do the same as the key bump if you'd rather keep the key as it was.