Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 21, 2024

The main problem here was that we can’t just deprecate syntax nodes since swift-syntax needs to still be able to use them internally (eg. when creating SyntaxEnum cases for as(SyntaxEnum.self)). What we do instead, is to have an underscored node that is not deprecated and deprecate a public typealias from the non-underscored version to the underscored version of the node.

While doing this, I also realized that the SyntaxKind compatibility layer didn’t add deprecation warnings and that we were still using some of them.

And finally, we need to annotate Syntax.Info.info as nonisolated(unsafe). It already had a comment that detailed when it might be modified.

@ahoppen ahoppen requested a review from bnbarham as a code owner March 21, 2024 20:10
@ahoppen ahoppen requested a review from rintaro March 21, 2024 20:10
@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2024

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/no-warnings-in-swiftsyntax branch from 739e0f9 to 9e61008 Compare March 22, 2024 07:43
@ahoppen
Copy link
Member Author

ahoppen commented Mar 22, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2024

swiftlang/swift#72557

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/no-warnings-in-swiftsyntax branch from 9e61008 to fcb117e Compare March 25, 2024 22:22
@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2024

swiftlang/swift#72557

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2024

swiftlang/swift#72557

@swift-ci Please test Windows

ahoppen added 3 commits March 26, 2024 08:54
…ed version and deprecate a typealias

This allows us to still use the underscored version internally (eg. when matching the syntax node kind during the creation of a `SyntaxEnum` and keep swift-syntax building without warnings.
@ahoppen ahoppen force-pushed the ahoppen/no-warnings-in-swiftsyntax branch from fcb117e to 24c8f91 Compare March 26, 2024 07:55
@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2024

swiftlang/swift#72557

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2024

swiftlang/swift#72557

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 27e8f91 into swiftlang:main Mar 26, 2024
@ahoppen ahoppen deleted the ahoppen/no-warnings-in-swiftsyntax branch March 26, 2024 23:17
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