New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(prebuild-config): add support for experiments.ccacheIos
to enable new ccache flag
#28398
Conversation
… up subsequent iOS builds.
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
this looks like something that we can add inside expo-build-properties, since it's CNG project only and not working for expo-go or bare project. |
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
it'd be great to try this with our eas build cache, to see if we can cache the ccache cache dir and speed up builds |
…ble c++ compiler cache (#28638) # Why Closes #28398 This is a re-implementation of #28398, but implemented through `expo-build-properties`. # How - [x] Added `ios.ccacheEnabled` to `expo-build-properties`, to add the `apple.ccacheEnabled` podfile property. - [x] Updated the template to enable `:ccache_enabled` once podfile property is true. - [x] Update the docs to document this new property. # Test Plan See added test # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com> Co-authored-by: Kudo Chien <kudo@expo.dev>
Why
Sets the
ccache
property in the Podfile.properties.json file to enable caching of subsequent iOS builds.Requires additional setup and doesn't always work https://reactnative.dev/docs/build-speed#xcode-specific-setup
I was able to get it working with
brew install ccache
.After
experiments.ccacheIos
is enabled, prebuild and pod install must be run again.Running
cache -s
prints the cache statistics. Run this after a successful iOS build to see the progress.The ccache can be cleared with
ccache --clear
for sanity.Ref PR (first available react-native@0.74.0): facebook/react-native@e85d51c
How
Unlike all other config plugins which follow the original migration strategy, this plugin is much simpler. I simply added it to the prebuild-config package and added some tests which run the mods. This enabled me to reduce the layers of indirection which we used to have in order to test behavior.
Test Plan
Leveraged new test runner (overkill here) to ensure the value is set E2E with minimal code.
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).