fix(ci): stop caching the generated example/ios/Pods tree - #283
Merged
Conversation
build-ios has failed on every PR since late July with a link error in the
example app:
"typeinfo for facebook::react::YogaStylableProps", referenced from ...
"vtable for facebook::react::DebugStringConvertible", referenced from
... in libRNScreens.a(RNSFullWindowOverlay.o)
ld: symbol(s) not found for architecture arm64
Root cause is the CI cache, not the app. The CocoaPods cache included
`example/ios/Pods` -- the *generated* install tree -- with a loose
`restore-keys: ${{ runner.os }}-cocoapods-` fallback. Since the v6
migration changed the Podfile/podspec hash, the exact key never matches, so
every run restores a pre-v6 Pods tree. The failing run shows it plainly:
key: macOS-cocoapods-21c48bdc... (requested)
restored: macOS-cocoapods-a2f4547b... (stale, different key)
`pod install` does not fully reconcile a stale tree, so RNScreens compiled
against stale React Native headers while linking the current prebuilt
React.xcframework -- a header/binary mismatch that surfaces as the missing
`facebook::react::*` vtables above.
Verified locally: a clean `pod install` + the exact CI xcodebuild command
BUILD SUCCEEDED on the same commit, with the same prebuilt core. Only the
stale cache distinguishes CI.
Fix:
- Cache only `~/.cocoapods` and `~/Library/Caches/CocoaPods`. These are
content-addressed download caches, so a restore-key hit is safe and still
avoids re-downloading pods; the Pods tree is regenerated each run (~20s).
- Add `yarn.lock` to both keys so a React Native version change invalidates
them.
- Drop the DerivedData `restore-keys` so it is exact-match only. A partial
hit would mix object files built against a different Pods install -- the
same staleness class of bug, latent (that cache was cold in the failing
run).
Applied to both jobs that install the example Pods: build-ios and
ios-unit-tests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR corrects stale iOS CI caching by excluding the generated Pods installation tree and requiring exact matches for DerivedData.
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Narrows CocoaPods caching and strengthens DerivedData invalidation without introducing an actionable workflow defect. |
Reviews (1): Last reviewed commit: "fix(ci): stop caching the generated exam..." | Re-trigger Greptile
EPIKorial
approved these changes
Aug 20, 2026
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.
Summary
build-ioshas failed on every PR since late July — including PRs that only touch a test-project lockfile. The failure is the CI cache, not the app code.Root cause
The CocoaPods cache included
example/ios/Pods— the generated install tree — behind a looserestore-keys: ${{ runner.os }}-cocoapods-fallback. The v6 migration (#243, merged 2026-07-24) changed the Podfile/podspec hash, so the exact key has never matched since. Every run therefore restores a pre-v6 Pods tree. From the failing run's log:pod installdoes not fully reconcile a stale tree. RNScreens then compiled against stale React Native headers while linking the current prebuiltReact.xcframework— a header/binary mismatch that surfaces as those missingfacebook::react::*vtables.The timeline matches exactly:
build-iospassed through 2026-07-25 and has failed on every run since, across unrelated branches.Verification
On this same commit, with a clean
pod installand the exact CIxcodebuildinvocation:Same prebuilt core, same Xcode 26. Only the stale cache distinguishes CI from a working build. As a control, a stale local Pods tree failed too — with a different stale-artifact error (
Build input file cannot be found: RCTConvert_PurchaselyRN.m, a file the v6 reorg removed), independently showing that a stale Pods tree survivespod installand breaks the build.Fix
~/.cocoapodsand~/Library/Caches/CocoaPods. These are content-addressed download caches, so a restore-key hit is safe and still avoids re-downloading pods. The Pods tree is regenerated each run (~20s locally).yarn.lockto both cache keys so a React Native version bump invalidates them.restore-keysso it is exact-match only. A partial hit would mix object files built against a different Pods install — the same staleness class of bug. It was latent here (that cache was cold in the failing run), but it is the same footgun.Applied to both jobs that install the example Pods:
build-iosandios-unit-tests.Note on what this does not change
No app, Podfile, or dependency changes — the diff is workflow-only. That is deliberate: if
build-iosgoes green here, it confirms the diagnosis, since nothing but the cache behaviour changed.Unrelated and left alone: #278 fixes a different iOS problem (a Swift header compile error under Xcode 26 explicit modules); it does not address this link failure.
Test plan
pod install+ CI's exactxcodebuildcommand locally —** BUILD SUCCEEDED **ruby -ryamlparses the workflow; all 7 jobs still presentbuild-iosgreen in CI on this PR (the real test)iOS Unit Tests (bridge)still green with the narrowed cache🤖 Generated with Claude Code