-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cocoapods: Fix deprecated/removed File.exists method #3919
Cocoapods: Fix deprecated/removed File.exists method #3919
Conversation
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.
Thanks for your PR! 🚀
I thought my explanation was pretty detailed - what part are you lost on? |
Noticed on accident when I upgraded Ruby on accident to 3 - that my `pod install` failed with: ``` [!] Invalid `Podfile` file: [!] Invalid `RNReanimated.podspec` file: undefined method `exists?' for File:Class. # from /Users/xx/iOSProjects/xx-app/node_modules/react-native-reanimated/RNReanimated.podspec:5 # ------------------------------------------- # reanimated_package_json = JSON.parse(File.read(File.join(__dir__, "package.json"))) > config = find_config() ``` Theres a good deal of other errors after I fixed this one on other projects, but this looks like a safe change to get ahead of the future Ruby upgrade. Yeah I did downgrade back to 2.7.5. ## Summary Resolves the removed method of `File.exists` in Ruby3. The alternative method of `File.exist` is recommended and already exists on 2.5 for no breaking changes. https://rubyapi.org/2.5/o/file#method-c-exist-3F ## Test plan A local working `pod install`
go to: |
Is this being released? |
If you use patch package here is a file working with 2.12: react-native-reanimated+2.12.0.patch
|
…35853) Summary: Remove deprecated `File.exists` method which was removed in later Ruby versions. Spotted during a brew upgrade [here](software-mansion/react-native-reanimated#3919). https://rubyapi.org/2.5/o/file#method-c-exist-3F ``` Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` [!] Failed to load 'hermes-engine' podspec: [!] Invalid `hermes-engine.podspec` file: undefined method `exists?' for File:Class. # from [..]/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:46 ``` ## Changelog [IOS] [FIXED] - Migrated `File.exists` from Hermes podspec for non-deprecated `File.exist`. Pull Request resolved: #35853 Test Plan: Valid CI via CircleCI. Reviewed By: dmytrorykun Differential Revision: D42543148 Pulled By: cipolleschi fbshipit-source-id: 5ed30d8cc3e4c91a6e86d51f7d44a125bf85f7e8
…acebook#35853) Summary: Remove deprecated `File.exists` method which was removed in later Ruby versions. Spotted during a brew upgrade [here](software-mansion/react-native-reanimated#3919). https://rubyapi.org/2.5/o/file#method-c-exist-3F ``` Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` [!] Failed to load 'hermes-engine' podspec: [!] Invalid `hermes-engine.podspec` file: undefined method `exists?' for File:Class. # from [..]/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:46 ``` ## Changelog [IOS] [FIXED] - Migrated `File.exists` from Hermes podspec for non-deprecated `File.exist`. Pull Request resolved: facebook#35853 Test Plan: Valid CI via CircleCI. Reviewed By: dmytrorykun Differential Revision: D42543148 Pulled By: cipolleschi fbshipit-source-id: 5ed30d8cc3e4c91a6e86d51f7d44a125bf85f7e8
…n#3919) Noticed on accident when I upgraded Ruby on accident to 3 - that my `pod install` failed with: ``` [!] Invalid `Podfile` file: [!] Invalid `RNReanimated.podspec` file: undefined method `exists?' for File:Class. # from /Users/xx/iOSProjects/xx-app/node_modules/react-native-reanimated/RNReanimated.podspec:5 # ------------------------------------------- # reanimated_package_json = JSON.parse(File.read(File.join(__dir__, "package.json"))) > config = find_config() ``` Theres a good deal of other errors after I fixed this one on other projects, but this looks like a safe change to get ahead of the future Ruby upgrade. Yeah I did downgrade back to 2.7.5. ## Summary Resolves the removed method of `File.exists` in Ruby3. The alternative method of `File.exist` is recommended and already exists on 2.5 for no breaking changes. https://rubyapi.org/2.5/o/file#method-c-exist-3F ## Test plan A local working `pod install`
Noticed on accident when I upgraded Ruby on accident to 3 - that my
pod install
failed with:Theres a good deal of other errors after I fixed this one on other projects, but this looks like a safe change to get ahead of the future Ruby upgrade. Yeah I did downgrade back to 2.7.5.
Summary
Resolves the removed method of
File.exists
in Ruby3. The alternative method ofFile.exist
is recommended and already exists on 2.5 for no breaking changes.https://rubyapi.org/2.5/o/file#method-c-exist-3F
Test plan
A local working
pod install