Skip to content

Remove the typealiases in SwiftSyntaxBuilder that refer to syntax nodes without the Syntax suffix #1183

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 4, 2023

In the past, before SwiftSyntaxBuilder shared the same syntax nodes with SwiftSyntax, it made sense for it to have its own syntax nodes and thus drop the Syntax suffix.

But since SwiftSyntaxBuilder is now just providing convenience initializers, it’s confusing to have two names to refer to the same type - the style was already pretty inconsitent in this code base. To make things consistent, drop the typealiases.

@ahoppen ahoppen requested review from bnbarham and kimdv January 4, 2023 17:29
Copy link
Contributor

@kimdv kimdv left a comment

Choose a reason for hiding this comment

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

Nice!

It have always confused me with the typealias

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

Awesome, thanks Alex!

@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from d2b895d to a6ee7e3 Compare January 10, 2023 19:40
@ahoppen
Copy link
Member Author

ahoppen commented Jan 10, 2023

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from a6ee7e3 to 3c7b226 Compare January 10, 2023 21:12
@ahoppen
Copy link
Member Author

ahoppen commented Jan 10, 2023

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from 3c7b226 to 9989334 Compare January 11, 2023 07:02
@ahoppen
Copy link
Member Author

ahoppen commented Jan 11, 2023

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from 9989334 to b6bd54a Compare January 12, 2023 10:30
@ahoppen
Copy link
Member Author

ahoppen commented Jan 12, 2023

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from b6bd54a to 3161a4e Compare January 13, 2023 09:01
@ahoppen
Copy link
Member Author

ahoppen commented Jan 13, 2023

@swift-ci Please test

…es without the `Syntax` suffix

In the past, before SwiftSyntaxBuilder shared the same syntax nodes with SwiftSyntax, it made sense for it to have its own syntax nodes and thus drop the `Syntax` suffix.

But since SwiftSyntaxBuilder is now just providing convenience initializers, it’s confusing to have two names to refer to the same type - the style was already pretty inconsitent in this code base. To make things consistent, drop the typealiases.
@ahoppen ahoppen force-pushed the ahoppen/remove-swiftsyntaxbuilder-typealias branch from 3161a4e to 6df9357 Compare January 13, 2023 14:17
@ahoppen
Copy link
Member Author

ahoppen commented Jan 13, 2023

@swift-ci Please test

@ahoppen ahoppen merged commit a0cf4cd into swiftlang:main Jan 13, 2023
@ahoppen ahoppen deleted the ahoppen/remove-swiftsyntaxbuilder-typealias branch January 13, 2023 17:32
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Jan 13, 2023
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