Page MenuHomePhabricator

[patch] Patch `expo-modules-core` to unblock iOS build on macOS Sonoma
ClosedPublic

Authored by atul on Sep 19 2023, 9:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 10:34 AM
Unknown Object (File)
Nov 11 2024, 12:59 PM
Unknown Object (File)
Oct 31 2024, 1:27 PM
Unknown Object (File)
Oct 31 2024, 1:27 PM
Unknown Object (File)
Oct 31 2024, 1:27 PM
Unknown Object (File)
Oct 31 2024, 1:27 PM
Unknown Object (File)
Oct 31 2024, 1:27 PM
Unknown Object (File)
Oct 31 2024, 1:26 PM
Subscribers
None

Details

Summary
Test Plan

No longer encountering the Foundation import issue after yarn cleaninstall

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Sep 19 2023, 10:00 AM

Is there a GitHub issue in Expo's GitHub repo for this?

Is there a GitHub issue in Expo's GitHub repo for this?

Not that I'm seeing. I think it might have to do with how we're importing some Expo library/some C++ target version setting specific to our project?

Can you create a GitHub issue on the Expo repo and link it here before landing?

This revision is now accepted and ready to land.Sep 20 2023, 10:36 AM

Can you create a GitHub issue on the Expo repo and link it here before landing?

Yeah I can make a GitHub issue before landing. I'm fairly sure this is something specific to our codebase so I'll try to do a little more investigation before submitting an issue.

Would be great to get this landed soon as more of the team installs Xcode 15. I looked through Expo's GitHub issues and was surprised I couldn't find anybody else experiencing this, and that the file still had this "issue" on main.

Expo has high expectations for issue reports... basically they want a minimally viable reproducible example for each report. As a prelude to that, I spent some time trying to figure out what might be "custom" about our environment.

I found this Apple doc that talks about the error we're seeing:

Import of C++ module 'Foundation' appears within extern "C" language linkage specification

There it appears that this error only appears when the user enables the "module verifier build setting". I looked through our project but that setting doesn't appear to be enabled for us. I couldn't find any reference to ENABLE_MODULE_VERIFIER on the React Native repo, but I did find this test file on the Expo repo.

Then I considered that maybe the "module verifier" becomes default-on in Xcode 15. Indeed, that looks to be the case – you can see it mentioned in the Xcode 15 release notes:

Validate the ability to link with modules at build time. Module verification is enabled by default, but you can enable and disable verification by setting Enable Module Verifier in build settings. See Build settings reference.

My new theory is that something weird about our environment is preventing some override of USE_MODULE_VERIFIER from applying, and thus Xcode falls back to its default behavior, which in Xcode 14 was to leave the module verifier off, but in Xcode 15 is to have it on. I haven't been able to get further than that though.

@atul can you create a task to investigate this further before landing? Probably not worth holding this fix back for much longer, but I'd like to get to the bottom of this. Would appreciate any help / insight you could share as well.

Expo has high expectations for issue reports... basically they want a minimally viable reproducible example for each report.

This was part of my hesitation to put up a GitHub Issue unless it was thorough/thought through.

My new theory is that something weird about our environment is preventing some override of USE_MODULE_VERIFIER from applying, and thus Xcode falls back to its default behavior, which in Xcode 14 was to leave the module verifier off, but in Xcode 15 is to have it on. I haven't been able to get further than that though.

Narrowing down to "module verifier build setting" is furthest I was able to get as well.

@atul can you create a task to investigate this further before landing? Probably not worth holding this fix back for much longer, but I'd like to get to the bottom of this. Would appreciate any help / insight you could share as well.

Yeah, I think it makes sense to land as-is to unblock people and defer a more complete investigation