-
Notifications
You must be signed in to change notification settings - Fork 904
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
run-ios bug: Try/catch removed from warnAboutManuallyLinkedLibs.ts
causing exceptions to propagate/crash
#1435
Comments
For this particular thing to work, we need to update the config to properly detect a Podfile. It is a mix of features and bugs, I will try to be as explicit as possible, the list of changes is really minimal. First of all, we need to set a proper path to a project. Since Luckily, this can be done right now with a configuration: module.exports = {
project: {
ios: {
project: "node_modules/react-native-test-app/ios/ReactTestApp.xcodeproj",
},
},
}; When we do it, we can see the output of "ios": {
"sourceDir": "/Users/grabbou/Repositories/menu/example/node_modules/react-native-test-app/ios",
"folder": "/Users/grabbou/Repositories/menu/example",
"pbxprojPath": "/Users/grabbou/Repositories/menu/example/node_modules/react-native-test-app/ios/ReactTestApp.xcodeproj/project.pbxproj",
"podfile": null,
"podspecPath": null,
"projectPath": "/Users/grabbou/Repositories/menu/example/node_modules/react-native-test-app/ios/ReactTestApp.xcodeproj",
"projectName": "ReactTestApp.xcodeproj",
"libraryFolder": "Libraries",
"sharedLibraries": [],
"plist": [],
"scriptPhases": []
}, As you can see, However, Rather than fighting with direction mechanisms and globs, I would just let people set a path to a podfile. In other words, make it possible to pass the "podfile" as a part of config: module.exports = {
project: {
ios: {
project: "node_modules/react-native-test-app/ios/ReactTestApp.xcodeproj",
podfile: "ios/Podfile"
},
},
}; which will be useful in the future anyway. This is needed to make autolinking to work. |
Thanks for the detailed explanation, @grabbou. There is one thing I don't quite understand though. It sounds like the only piece of information that we need from the user is where the |
We don't need it, it's been used for legacy link. That's why I don't want to derive anything from
As you have noticed yourself - it will become the only thing (well, except for maybe scriptPhases) that is needed. I agree that we should not assume that these exist next to each other, but again, the default values were meant to satisfy the most popular setup (aka the default one). This needs a general clean up, so I feel like adding an override is kinda safe when defaults are broken, while we work on the new thing. |
If you look at the only three properties are used. I didn't remove the |
For context, we used to rely on an In retrospection, I don't think we necessarily need to support non-standard locations. If someone's using something different than When CocoaPods support arrived, it was first optional, then became the default. Since it was "by default" next to |
Thanks for the context. It makes total sense given the history. Is manual linking still used with CLI version 5.x and 6.x? |
Update this is being addressed in 596d849#diff-324776bfd410a79f7aaa6bc69a310a8515358fe9abfb81c69ae3744ca784c9fcL45 where I have made Podfile detection the source of truth. |
Environment
Description
This refers to microsoft/react-native-test-app#375
I was working on moving a community module to use React Native Test App to manage the test app of a community module (https://github.com/react-native-menu/menu), and ran into an error running
run-ios
. After investigation, it seems the issue happened upstream beginning in #1270 .A try-catch was removed from
packages/platform-ios/src/link/warnAboutManuallyLinkedLibs.ts
, causing the exception to bubble up and crash. This seems like an error, because an Android fix shouldn't have broken something downstream for iOS.Reproducible Demo
A little bit contrived since I reproed this using a downstream module, but:
The text was updated successfully, but these errors were encountered: