-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Fix runtime crash when using Obj-C dependencies #5929
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.
Amazing ❤️
I wonder if the same principle could be applied to add the |
I think we need to be careful with auto-loading compiler flags onto the Xcode Projects unless they are an industry standard of obvious. Things like -all_load could be quite problematic and it's better to leave customized. I think it's good to think about it as - if Xcode does it automatically, Tuist probably should too (i.e. when you add ObjC - Xcode will automatically add that flag, bridging etc). Otherwise, it should be manually customized. |
This reverts commit 9297022.
This reverts commit 9297022.
This reverts commit 9297022.
Short description 📝
As reported by @freak4pc, the current fix for ObjC dependencies is missing the addition of the
-ObjC
linker flag. When accessing ObjC code without this flag, the app crashes with anunrecognized selector sent to instance ...
.We can add the flag whenever there's a
modulemap
as that's a good way to tell if a target has an objc dependency.How to test the changes locally 🧐
Run
app_with_spm_dependencies
app. Before this PR and with the current changes inAppKit
, the app would crash in runtime.Contributor checklist ✅
mise run lint:fix
Reviewer checklist ✅
changelog:added
,changelog:fixed
, orchangelog:changed
, and the title is usable as a changelog entry