Skip to content

Deprecate SyntaxCollection.replacing(childAt:with:) in favor of a writable subscript #1880

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 1 commit into from
Jul 7, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jul 6, 2023

The writable subscript fits much better into the current API design of SwiftSyntax instead of the hand-written replacing function, especially if we deprecate all the other hand-written manipulation methods in #1879.

@ahoppen ahoppen requested review from rintaro and bnbarham July 6, 2023 09:36
@ahoppen ahoppen requested a review from DougGregor as a code owner July 6, 2023 09:36
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Yes, this is very nice!

@rintaro
Copy link
Member

rintaro commented Jul 6, 2023

Can SyntaxCollection now be MutableCollection?

@ahoppen ahoppen force-pushed the ahoppen/syntax-collection-index branch from eeff165 to b852e3c Compare July 7, 2023 10:15
@ahoppen
Copy link
Member Author

ahoppen commented Jul 7, 2023

Can SyntaxCollection now be MutableCollection?

Good idea 👍🏽

@ahoppen
Copy link
Member Author

ahoppen commented Jul 7, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jul 7, 2023

@swift-ci Please test Windows

@ahoppen ahoppen enabled auto-merge July 7, 2023 18:02
@ahoppen ahoppen merged commit e7db129 into swiftlang:main Jul 7, 2023
@ahoppen ahoppen deleted the ahoppen/syntax-collection-index branch July 11, 2023 06:07
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