-
Notifications
You must be signed in to change notification settings - Fork 268
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 lldb when using experimental_mixed_language_library
#1911
base: master
Are you sure you want to change the base?
Fix lldb when using experimental_mixed_language_library
#1911
Conversation
I probably have to make a couple more tweaks, but the key thing is that only the objc custom modulemap ends up downstream |
@thii Do you know of an example where this breaks? |
I think I'll also try to have a single umbrella modulemap created instead (one that doesn't depend on the swift_library, but still has the generated header entry), as that would solve this problem as well: https://github.com/buildbuddy-io/rules_xcodeproj/blob/main/docs/faq.md#why-do-some-of-my-swift_librarys-compile-twice-in-bwx-mode |
I think On why lldb breaks, I think it's because the generated Swift header always have this kind of import statement:
and if you don't have codebase structure that makes this work, or proper Edit: Obj-C umbrella header import statement in Swift generated header, not Swift generated header import statement. |
I'll try the single module map method instead then Monday. |
Edit: It was the Obj-C umbrella header import statement in the Swift generated header, not the Swift generated header import statement within itself. Updated the above comment as well. |
The lldb issue is because later I think the proper fix is that we need two module maps to get propagated:
And that way both are seen and depended on down stream. I don't get how modulemaps are used with Bazel compilation though, as I couldn't get a dependent objc_library to see the modulemap created by this macro. So I think someone else will have to take on this fix. |
IIRC it was done like that so that we didn't have to change our import statements during the migration to Bazel. For example Now thinking about it again, I guess this might have been the reason of many of our lldb issues in the past. |
Does this change work for you too @chiragramani? |
experimental_mixed_language_library.
experimental_mixed_language_library
We have a slightly different implementation, but I think the root cause you highlighted would also fix our case. I will check and let you know. Thanks! |
This applies a similar fix that MobileNativeFoundation/rules_xcodeproj@d40173d did, for the same reason.