Skip to content

Swift 5.8 Support #289

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

Merged
merged 17 commits into from
Mar 31, 2023
Merged

Swift 5.8 Support #289

merged 17 commits into from
Mar 31, 2023

Conversation

stephencelis
Copy link
Member

@stephencelis stephencelis commented Mar 24, 2023

To prepare for the release of Xcode 14.3 and Swift 5.8, Parsing must make some breaking changes. This PR overhauls the ParserBuilder and OneOfBuilder to be compatible with Swift 5.8's new result builder implementation. Apple's decided to make breaking changes to result builders to improve their performance, and so we must adapt accordingly. Because of this, upgrading a project using Parsing to Swift 5.8 may not be trivial, but we'll do our best to describe the what, why, and how in an associated discussion.

Co-authored-by: Jaap Wijnen <[email protected]>
stephencelis and others added 12 commits March 24, 2023 16:53
* Downstream ParseBuilder should use Downstream.Input as Input

The ParseBuilder is for Downstream so it should use it’s input. Or Upstream.Output as pipe runs the downstream parser on the output of the upstream parser. Which is why Upstream.Output == Downstream.Input.

With the 5.8 changes pipe uses the wrong input here. This only causes issues, if Upstream and Downstream have a different Input type.

* Pipe - Use Upstream.Output instead of Downstream.Input
@stephencelis stephencelis marked this pull request as ready for review March 28, 2023 17:13
@stephencelis stephencelis merged commit c6e2241 into main Mar 31, 2023
@stephencelis stephencelis deleted the swift-5-8 branch March 31, 2023 15:47
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.

3 participants