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

Update SwiftSyntax dependency to 510.0.0 #1294

Merged
merged 2 commits into from Mar 8, 2024

Conversation

calda
Copy link
Contributor

@calda calda commented Mar 7, 2024

This PR updates the SwiftSyntax dependency from 508.0.1 to 510.0.0. This should add support for parsing syntax that was added in Swift 5.9 / Swift 5.10.

For example, within Airbnb we've sometimes seen parsing failures in Sourcery when trying to use if / switch expressions. These were added in Swift 5.9 so are not supported by SwiftSyntax 508.0.1. I believe updating to a more recent version of SwiftSyntax should fix this issue.

SwiftSyntax 509.0.0 included a lot of breaking changes. This PR fixes all the breaking changes, so everything compiles.

As far as I can tell locally, the tests still pass after these changes.

@art-divin art-divin added this to the 2.1.8 milestone Mar 8, 2024
@art-divin art-divin self-requested a review March 8, 2024 07:10
@art-divin
Copy link
Collaborator

Hello @calda ,

firstly, welcome to The Contributors club 🤝 🥳 🎈 🎉

secondly, thank you so much for tackling this! I have had this in mind, but postponed it until after 2.1.8 release.
And with your tremendous help, now 2.1.8 would include this improvement!

CI passed, so this PR is verified by more than 600 tests, in actuality there are much more unit tests within those 600+ behavioural tests.

Merging 🎉

@art-divin art-divin merged commit 864505a into krzysztofzablocki:master Mar 8, 2024
2 checks passed
art-divin added a commit that referenced this pull request Mar 10, 2024
commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build
art-divin added a commit that referenced this pull request Mar 10, 2024
commit 5e6df69
Author: Ruslan Alikhamov <r.alikhamov@gmail.com>
Date:   Sun Mar 10 11:53:37 2024 +0400

    Resolved all SwiftSyntax Warnings (#1295)

    * Resolved all swiftSyntax warnings

    * Set concrete Ubuntu version to fix GH action

    * Switch to another GH action

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build
art-divin added a commit that referenced this pull request Mar 10, 2024
* Refactoring

* Squashed commit of the following:

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed build error

* Removed TODO

* Adding new annotation parsing method

* Squashed commit of the following:

commit 5e6df69
Author: Ruslan Alikhamov <r.alikhamov@gmail.com>
Date:   Sun Mar 10 11:53:37 2024 +0400

    Resolved all SwiftSyntax Warnings (#1295)

    * Resolved all swiftSyntax warnings

    * Set concrete Ubuntu version to fix GH action

    * Switch to another GH action

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed incorrect parsing of annotations in trailing trivia

* Removed redundant file

* Removed redundant method

* Reverted redundant changes
calda added a commit to calda/Sourcery that referenced this pull request Mar 11, 2024
* Update to SwiftSyntax for Swift 5.10

* Patch build
calda added a commit to calda/Sourcery that referenced this pull request Mar 11, 2024
* Update to SwiftSyntax for Swift 5.10

* Patch build
@calda
Copy link
Contributor Author

calda commented Mar 11, 2024

For example, within Airbnb we've sometimes seen parsing failures in Sourcery when trying to use if / switch expressions. These were added in Swift 5.9 so are not supported by SwiftSyntax 508.0.1. I believe updating to a more recent version of SwiftSyntax should fix this issue.

To close the loop on this, I confirmed that updating to a build of Sourcery that includes this change fixes the parsing issue we were encountering.

art-divin pushed a commit that referenced this pull request Mar 17, 2024
* Update to SwiftSyntax for Swift 5.10

* Patch build
art-divin added a commit that referenced this pull request Mar 17, 2024
* Refactoring

* Squashed commit of the following:

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed build error

* Removed TODO

* Adding new annotation parsing method

* Squashed commit of the following:

commit 5e6df69
Author: Ruslan Alikhamov <r.alikhamov@gmail.com>
Date:   Sun Mar 10 11:53:37 2024 +0400

    Resolved all SwiftSyntax Warnings (#1295)

    * Resolved all swiftSyntax warnings

    * Set concrete Ubuntu version to fix GH action

    * Switch to another GH action

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed incorrect parsing of annotations in trailing trivia

* Removed redundant file

* Removed redundant method

* Reverted redundant changes
art-divin pushed a commit that referenced this pull request Mar 17, 2024
* Update to SwiftSyntax for Swift 5.10

* Patch build
art-divin added a commit that referenced this pull request Mar 17, 2024
* Refactoring

* Squashed commit of the following:

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed build error

* Removed TODO

* Adding new annotation parsing method

* Squashed commit of the following:

commit 5e6df69
Author: Ruslan Alikhamov <r.alikhamov@gmail.com>
Date:   Sun Mar 10 11:53:37 2024 +0400

    Resolved all SwiftSyntax Warnings (#1295)

    * Resolved all swiftSyntax warnings

    * Set concrete Ubuntu version to fix GH action

    * Switch to another GH action

commit 864505a
Author: Cal Stephens <cal@calstephens.tech>
Date:   Thu Mar 7 23:10:56 2024 -0800

    Update SwiftSyntax dependency to 510.0.0 (#1294)

    * Update to SwiftSyntax for Swift 5.10

    * Patch build

* Fixed incorrect parsing of annotations in trailing trivia

* Removed redundant file

* Removed redundant method

* Reverted redundant changes
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.

None yet

2 participants