Skip to content
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 building ApolloSQLite with Xcode 16b1 #386

Conversation

rastersize
Copy link
Contributor

@rastersize rastersize commented Jun 10, 2024

In Xcode 16, or rather Foundation in the iOS 18/etc. SDKs, there’s a new Expression type. The SQLite library also expose this type. This caused an issue compiling the SQLiteDotSwiftDatabase.swift file, as it imports both libraries. This PR disambiguates it for the compiler.

With this change the project once again builds with Xcode 16.

Screenshot 2024-06-10 at 3 59 48 PM

@apollo-cla
Copy link

@rastersize: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

Copy link

netlify bot commented Jun 10, 2024

👷 Deploy request for apollo-ios-docc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ab9247e

Copy link

netlify bot commented Jun 10, 2024

👷 Deploy request for eclectic-pie-88a2ba pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ab9247e

@rastersize rastersize changed the title Fix building ApolloSQLite with Xcode 16 Fix building ApolloSQLite with Xcode 16b1 Jun 10, 2024
@calvincestari
Copy link
Member

Looks like it failed the test__memory_management__givenOperation_withEarlyAndFinalInterceptorChainExit_shouldNotHaveRetainCycle_andShouldNotCrash test which is a known flaky test.

@Mordil
Copy link
Contributor

Mordil commented Jun 10, 2024

Do the initializers need to be updated as well since they have explicit references to the types?

@calvincestari
Copy link
Member

Do the initializers need to be updated as well since they have explicit references to the types?

I thought that too but then thought that the fully qualified property declaration on line 11 and 12 is enough for the compiler to know which type you actually want to use at those call sites in the initializers. I don't have Xcode 16 yet so I'm guessing at that theory.

@rastersize
Copy link
Contributor Author

@Mordil @calvincestari They don’t need to be update to build (I tested in Xcode 16b1). I can add it there as well though if you prefer?

@calvincestari
Copy link
Member

I can add it there as well though if you prefer?

I don't think it's necessary if the compiler is not complaining about it. There's a chance that it becomes a requirement in a future version of Xcode 16 but if that happens we can add it then.

@calvincestari
Copy link
Member

I've confirmed this fix with Xcode 16.0 beta (16A5171c) and skipped the flaky test so we can get this PR merged.

@calvincestari
Copy link
Member

I've noticed there are some other build errors with Xcode 16 but they're limited to our test suites which I'll get fixed in a separate PR. This PR alone should be enough to get the dependency building again in your projects. Thanks for the contribution @rastersize.

@calvincestari calvincestari merged commit f8f7a2d into apollographql:main Jun 10, 2024
15 checks passed
BobaFetters pushed a commit to apollographql/apollo-ios that referenced this pull request Jun 10, 2024
BobaFetters pushed a commit that referenced this pull request Jun 10, 2024
22cc0b64 Fix building ApolloSQLite with Xcode 16b1 (#386)

git-subtree-dir: apollo-ios
git-subtree-split: 22cc0b64d8930ad234d9b618a0940e8809ad98c4
BobaFetters pushed a commit that referenced this pull request Jun 10, 2024
git-subtree-dir: apollo-ios
git-subtree-mainline: 1395580
git-subtree-split: 22cc0b64d8930ad234d9b618a0940e8809ad98c4
@rastersize rastersize deleted the fix-building-apollosql-with-xcode-16 branch June 12, 2024 13:56
v-ahadke pushed a commit to v-ahadke/apollo-ios that referenced this pull request Jun 23, 2024
Kid17-iOS pushed a commit to Kid17-iOS/apollo-ios that referenced this pull request Jul 22, 2024
Kid17-iOS pushed a commit to Kid17-iOS/apollo-ios that referenced this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Naming conflict with Foundation in Xcode 16
4 participants