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

Implicit self capture semantic error at compilation #3441

Closed
Kireyin opened this issue Sep 13, 2024 · 4 comments
Closed

Implicit self capture semantic error at compilation #3441

Kireyin opened this issue Sep 13, 2024 · 4 comments
Assignees
Labels
bug Generally incorrect behavior needs investigation

Comments

@Kireyin
Copy link

Kireyin commented Sep 13, 2024

Summary

When compiling and trying to publish against latest version of Apollo, the compiler (Xcode 14.1) raises the following issue

Apollo/Sources/Apollo/ApolloStore.swift:208:22: error: reference to property 'cache' in closure requires explicit use of 'self' to make capture semantics explicit

Implicit self capture in closure is a recent feature, not supported by all version of Xcode. Having implicit capture in you closure is a breaking change.

I added a comment on the incriminating commit here to help you locate the error-> 7d0c7e9#r146660778

Version

1.15.0

Steps to reproduce the behavior

Compile with Xcode 14.1

Logs

No response

Anything else?

No response

@Kireyin Kireyin added bug Generally incorrect behavior needs investigation labels Sep 13, 2024
@AnthonyMDev
Copy link
Contributor

Thanks for the heads up on this one. We'll get this fixed. @calvincestari We stopped running our CI tests on Xcode 14.1 recently due to some limitation there, right?

@AnthonyMDev AnthonyMDev self-assigned this Sep 13, 2024
@calvincestari
Copy link
Member

Hi @Kireyin - how/where are you distributing the apps built with Xcode 14.1?

The current minimum Xcode version required to submit to the App Store is Xcode 15. I don't recall the specific behaviour of self capture in the version of Swift that ships with Xcode 15 but I think it's reasonable for us to support only the minimum version required for App Store submission.

@AnthonyMDev, I think our issues re. CI was for iOS versions which are no longer available. I'll have to check exactly what versions of Xcode we have available to us on CI, there might be some macOS issues there too though.

@Kireyin
Copy link
Author

Kireyin commented Sep 13, 2024

Hello @calvincestari , thanks for the quick response.

We only distribute SDKs and our CI was set up with Xcode 14.1 following Apple's communication about the minimum support last year (https://developer.apple.com/news/?id=jd9wcyov). It seems that we missed the April announcement about Xcode 15.

Sorry to have raised a false issue.

@Kireyin Kireyin closed this as completed Sep 13, 2024
Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants