GeezerVison is showing github.com — Change location of iOS build cache directory to ~/Library/Caches/ by sryze · Pull Request #22688 · react/react-native
Conversation
sryze
commented
Dec 18, 2018
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Instead of using ~/.rncache use the special Caches directory designed for caching files. This fixes #21780.
Changelog:
[iOS] [Changed] - Moved iOS build cache directory from ~/.rncache to ~/Library/Caches/com.facebook.ReactNativeBuild
Test Plan:
- Execute ./scripts/ios-install-third-party.sh
- Check that the directory ~/Library/Caches/com.facebook.ReactNativeBuild is created and that the .tar.gz files of dependencies are present
or better:
- Create a new project:
react-native init ReactNativeCacheTest
-
cd ReactNativeCacheTest
cp /path/to/react-native-code/scripts/ios-install-third-party.sh node_modules/react-native/scripts/
- In
ios-install-third-party.sh change:
fetch_and_unpack folly-2018.10.22.00.tar.gz https://github.com/facebook/folly/archive/v2018.10.22.00.tar.gz f70a75bfeb394363d2049a846bba118ffb3b368a
to:
fetch_and_unpack folly-2016.10.31.00.tar.gz https://github.com/facebook/folly/archive/v2016.10.31.00.tar.gz fb8cdf8962d8c9d0c20a150b6ec3b75d1fa50696
react-native run-ios
- Check that the directory ~/Library/Caches/com.facebook.ReactNativeBuild is created and that the .tar.gz files of dependencies are present
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Instead of using ~/.rncache use the special Caches directory designed
for caching files. This fixes react#21780.
|
@sryze I think it should check if .rncache is still existing and still use that instead. Only use the new location if not found. This prevents redownloading the cache for existing installs and new installs will use the new location.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sryze
commented
Dec 19, 2018
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
I agree, it's a good idea. I updated the script to make it reuse the old directory if it exists.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
2 more reviewers
cpojer
cpojer approved these changes
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
This PR has been merged.
Platform: iOS
iOS applications.
Milestone
No milestone
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.