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 Xcode 16 build failure caused by AsyncSubject #42

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Fix Xcode 16 build failure caused by AsyncSubject #42

merged 2 commits into from
Jun 27, 2024

Conversation

gsl-anthonymerle
Copy link
Contributor

Fix AsyncSubject's Failure type conflincting with Apple addition to AsyncSequence starting from Xcode 16 (iOS 18, MacOS 15, Vision OS 2, etc.)

Description

For more information on what caused the issue, see this discussion.

Fixed by:

  • Splitting AsyncSubject procotol into two protocols:
    • AsyncSubjectable, meant to define the send(element:) method and dependance to AsyncSequence and other protocols
    • AsyncSubjectTerminable, meant to define both the AsyncSubject's Failure type and the send(termination:) method
  • Making AsyncSubject a typealias to a conformance of both of these new protocols

This results in the compiler either:

  • using the AsyncSubjectTerminable's Failure type on its own when AsyncSequence doesn't defines it (up until Xcode 16)
  • allowing both AsyncSubjectTerminable and AsyncSequence's Failure type to be the same type when AsyncSequence does define its own Failure type (starting from Xcode 16)

Checklist

  • this PR is based on the main branch and is up-to-date, if not please rebase your branch on the top of main
  • the commits inside this PR have explicit commit messages
  • unit tests cover the new feature or the bug fix
  • the feature is documented in the README.md if it makes sense
  • the CHANGELOG is up-to-date

twittemb and others added 2 commits January 3, 2023 15:40
project: bump CHANGELOG to 0.5.2
…syncSequence starting from Xcode 16 (iOS 18, MacOS 15, Vision OS 2, etc.)
@twittemb
Copy link
Contributor

gonna review this asap

@gsl-anthonymerle
Copy link
Contributor Author

gonna review this asap

Sure! Thanks a lot 🙏

@twittemb twittemb self-requested a review June 27, 2024 12:16
Copy link
Contributor

@twittemb twittemb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants